*httpd* is a webserver container, which delivers file-requests and passes requests through to the php-service. the image is based on [debian:stretch-slim].
*symfony-httpd* is a webserver container based on [ubleipzig:httpd] with additional configuration based on [symfony/apache-pack].
The image is extended by shibboleth-support which depends on a running container based on [ubleipzig/shibboleth] though. Furthermore a self-signed certificate was added to the image to provide ssl-reguests.
## supported tags
## Supported tags
* 2.4-*, 2.4, 2, latest ([2.4/Dockerfile])
## Usage of the image
The image can be used in connection with an application server which can be accessed via proxy-fcgi. The user is responsible for a specific configuration for that, i.e. by creating a new inheriting image, such as [ubleipzig/vufind-httpd], which uses the application server ([ubleipzig/vufind-php]) of [VuFind]
out-of-the-box the server is only delivering static content. To start the webserver do as follows:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
ubleipzig/httpd
```
Be aware that the httpd-daemon needs read-access to the files it has to serve.
## advanced startup
By providing additional start options several features can be used
### SSL
To start containers with ssl-support enabled use the following startup command:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
-p 443:443 \
ubleipzig/httpd \
apache2 -D FOREGROUND -D ssl
```
The files for key and certificate are located under `/etc/ssl/private/ssl-cert-snakeoil.key` and `/etc/ssl/certs/ssl-cert-snakeoil.pem`. If you want to provide a real certificate, you have to overwrite these files or create a custom configuration.
### Debug
To prevent timeouts in debug-sessions the httpd-daemon can be started as follows:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
ubleipzig/httpd \
apache2 -D FOREGROUND -D debug
```
By this the directive `ProxyTimeout 3600` is set, which increases the timeout for (FCGI-)Proxy-Requests to one hour.
### Shibboleth
In order to use shibboleth we depend on a configured up and running shibboleth-authenticator - accessable at `/var/run/shibd.sock`. You can get one for example by creating a container based on the image [ubleipzig/shibboleth] and link it into the httpd-container at startup:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
--volumes-from shibboleth \
ubleipzig/httpd \
apache2 -D FOREGROUND -D shibboleth
```
## Advanced configuration
*`SHIB_HANDLER_URL=/Shibboleth.sso`: where apache's sibboleth-handler listens. only with `-D shibboleth`.
*`APACHE_RUN_DIR=/var/run/apache2`: the working directory of the httpd-daemon. almost always unnecessary to change. know, what you do.
*`APACHE_RUN_USER=www-data`: the user the httpd-daemon runs with. almost always unnecessary to change. know, what you do.
*`APACHE_RUN_GROUP=www-data`: the group the httpd-daemon runs with. almost always unnecessary to change. know, what you do.
*`APACHE_DOC_ROOT=/var/www/html`: the document root of the content to deliver.
*httpd* ist der Standard-Webserver, welcher Datei-Requests ausliefert und Anfragen an den PHP-Service weiterleitet. Das Basis-Image ist [debian:stretch-slim].
Das Image wurde um Shibboleth-Support ergänzt, benötigt dazu jedoch das [ubleipzig/shibboleth]-Image. Weiterhin wurde ein selbstsigniertes Zertifikat hinzugefügt, um Zugriffe per SSL zu ermöglichen.
*symfony-httpd* ist ein Webserver-Container basierend auf [ubleipzig:httpd] mit zusätzlicher Konfiguration basierend auf [symfony/apache-pack].
## Unterstützte tags
...
...
@@ -10,75 +8,8 @@ Das Image wurde um Shibboleth-Support ergänzt, benötigt dazu jedoch das [ublei
## Nutzung des Images
Das Image kann im Zusammenhang mit einem Applikationsserver, welcher per proxy-fcgi angesprochen werden kann, genutzt werden. Die Konfiguration hierzu obliegt dem Nutzer, beispielsweise durch die Erstellung eines ableitenden Images, siehe [ubleipzig/vufind-httpd], welches den Applikationsserver ([ubleipzig/vufind-php]) von [VuFind] nutzt.
Out-of-the-Box ist der Server lediglich zum Ausliefern statischer Inhalte nutzbar. Man kann den Webserver wie folgt starten:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
ubleipzig/httpd
```
Dabei muss darauf geachtet werden, dass der httpd-daemon entsprechende Zugriffsrechte auf die Dateien hat.
## erweiterte Startoptionen
Mithilfe erweiterter Startoptionen lassen sich zusätzliche Fähigkeiten nutzen
### SSL
Um den Zugriff via SSL zu ermöglichen, muss der httpd-Daemon mit wiefolgt gestartet werden:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
-p 443:443 \
ubleipzig/httpd \
apache2 -D FOREGROUND -D ssl
```
Die SSL-Dateien liegen unter `/etc/ssl/private/ssl-cert-snakeoil.key` und `/etc/ssl/certs/ssl-cert-snakeoil.pem`. Möchte man ein echtes Zertifikat verwenden, so muss man entweder diese Dateien überschreiben oder eine eigene Konfiguration einfügen.
### Debug
Um Timeouts beim Debuggen zu vermeiden, kann der httpd-Daemon wiefolgt gestartet werden:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
ubleipzig/httpd \
apache2 -D FOREGROUND -D debug
```
Dadurch wird die Direktive `ProxyTimeout 3600` gesetzt, welche das Timeout für FCGI-Proxy-Requests auf eine Stunde setzt.
### Shibboleth
Um Shibboleth-Support nutzen zu können, wird ein konfigurierter Shibboleth-Authenticator - erreichbar an `/var/run/shibd.sock` - erwartet. Diesen erhält man beispielsweise, in dem man einen Container basierend auf dem [ubleipzig/shibboleth]-Image startet und beim Start des httpd-Container in den Container verlinkt:
```bash
$# docker run --name httpd \
-v /path/to/static/files:/var/www/html \
-p 8:80 \
--volumes-from shibboleth \
ubleipzig/httpd \
apache2 -D FOREGROUND -D shibboleth
```
## Advanced configuration
*`SHIB_HANDLER_URL=/Shibboleth.sso`: Wo Apache's Shibboleth-Handler Anfragen erwartet. Nur sinnvoll in Verbindung mit `-D shibboleth`.
*`APACHE_RUN_DIR=/var/run/apache2`: Das Arbeitsverzeichnis des httpd-Daemons. So gut wie nie notwendig, anzupassen. Wisse, was du tust.
*`APACHE_RUN_USER=www-data`: Der Benutzer mit dem der httpd-Daemon startet. So gut wie nie notwendig, anzupassen. Wisse, was du tust.
*`APACHE_RUN_GROUP=www-data`: Die Gruppe mit dem der httpd-Daemon startet. So gut wie nie notwendig, anzupassen. Wisse, was du tust.
*`APACHE_DOC_ROOT=/var/www/html`: Das Document-Root aus dem der Inhalt ausgeliefert wird.
This repository holds the Dockerfiles and configuration for the Apache2-webserver, adjusted to serve vufind and other php-related applications developed by UBL.
This repository holds the Dockerfiles for a webserver container based on [ubleipzig:httpd] with additional configuration based on [symfony/apache-pack].
Basically we added shibboleth-support and expect all application-requests to be made by proxy-fcgi. every application using this service has to bring its own proxy-fcgi configuration. Furthermore we added ssl to support ssl-request out-of-the-box and add the debug-feature to increase ProxyTimeout, which is useful in debug-sessions.
See [ubleipzig:httpd] for further information.
## Image-Tags
...
...
@@ -33,6 +33,8 @@ In case you want to contribute please fork and make a pull-request at [Gitlab-ho