diff --git a/Dockerfile b/Dockerfile
index 59a96ef..b9b6f40 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,6 +15,8 @@ RUN \
-e 's,^#\(LoadModule authnz_ldap_module modules/mod_authnz_ldap.so\),\1,' \
-e 's,^#\(LoadModule ldap_module modules/mod_ldap.so\),\1,' \
-e 's,^#\(LoadModule ssl_module modules/mod_ssl.so\),\1,' \
+ -e 's,^#\(LoadModule watchdog_module modules/mod_watchdog.so\),\1,' \
+ -e 's,^#\(LoadModule md_module modules/mod_md.so\),\1,' \
-e 's,^#\(LoadModule socache_shmcb_module modules/mod_socache_shmcb.so\),\1,' \
-e 's,^#\(Include conf/extra/httpd-vhosts.conf\),Include conf/editable/httpd-vhosts.conf,' \
conf/httpd.conf && \
diff --git a/httpd-vhosts.conf-template b/httpd-vhosts.conf-template
index bf6fff5..dcb1d25 100644
--- a/httpd-vhosts.conf-template
+++ b/httpd-vhosts.conf-template
@@ -18,6 +18,8 @@ SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
+MDCertificateAgreement accepted
+
# Example on usage on above LDAPAuthConfig macro
#
@@ -26,8 +28,11 @@ SSLSessionCacheTimeout 300
# Require ldap-group CN=...
#
+#Listen 0.0.0.0:80
Listen 0.0.0.0:443
+MDomain test.example.com
+
ServerName test.example.com
Redirect / https://test.example.com
diff --git a/startScript.sh-template b/startScript.sh-template
index a3c1078..634690d 100644
--- a/startScript.sh-template
+++ b/startScript.sh-template
@@ -1,8 +1,18 @@
#!/bin/bash
+
CONTAINER_NAME="httpdispatcher"
IMAGE_NAME="wollud1969/httpdispatcher"
VERSION="latest"
+
+VOLUME_CONFIG=httpd-config
+VOLUME_LOGS=httpd-logs
+
+docker volume inspect $VOLUME_CONFIG > /dev/null || docker volume create $VOLUME_CONFIG
+docker volume inspect $VOLUME_LOGS > /dev/null || docker volume create $VOLUME_LOGS
+
+
+
if [ "$MAINADDR" = "" ]; then
MAINDEV=`ip route list match default | sed -e 's/^default.*dev \(\S\+\)\( \S\+\)\? \?$/\1/'`
MAINADDR=`ip addr list dev $MAINDEV | awk '/inet / {print $2}' | awk -F/ '{print $1}'`
@@ -12,6 +22,8 @@ docker run \
-d \
-p 80:80 \
-p 443:443 \
+ -v $VOLUME_CONFIG:/usr/local/apache2/conf/editable \
+ -v $VOLUME_LOGS:/usr/local/apache2/logs \
--add-host servicehost:$MAINADDR \
--name $CONTAINER_NAME \
--restart always \