add letsencrypt stuff

This commit is contained in:
Wolfgang Hottgenroth 2020-07-08 13:01:03 +00:00
parent 48b0afefa9
commit 285505c7ac
3 changed files with 19 additions and 0 deletions

View File

@ -15,6 +15,8 @@ RUN \
-e 's,^#\(LoadModule authnz_ldap_module modules/mod_authnz_ldap.so\),\1,' \ -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 ldap_module modules/mod_ldap.so\),\1,' \
-e 's,^#\(LoadModule ssl_module modules/mod_ssl.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,^#\(LoadModule socache_shmcb_module modules/mod_socache_shmcb.so\),\1,' \
-e 's,^#\(Include conf/extra/httpd-vhosts.conf\),Include conf/editable/httpd-vhosts.conf,' \ -e 's,^#\(Include conf/extra/httpd-vhosts.conf\),Include conf/editable/httpd-vhosts.conf,' \
conf/httpd.conf && \ conf/httpd.conf && \

View File

@ -18,6 +18,8 @@ SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)" SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300 SSLSessionCacheTimeout 300
MDCertificateAgreement accepted
# Example on usage on above LDAPAuthConfig macro # Example on usage on above LDAPAuthConfig macro
# <Location /pw> # <Location /pw>
@ -26,8 +28,11 @@ SSLSessionCacheTimeout 300
# Require ldap-group CN=... # Require ldap-group CN=...
# </Location> # </Location>
#Listen 0.0.0.0:80
Listen 0.0.0.0:443 Listen 0.0.0.0:443
MDomain test.example.com
<VirtualHost 0.0.0.0:80> <VirtualHost 0.0.0.0:80>
ServerName test.example.com ServerName test.example.com
Redirect / https://test.example.com Redirect / https://test.example.com

View File

@ -1,8 +1,18 @@
#!/bin/bash #!/bin/bash
CONTAINER_NAME="httpdispatcher" CONTAINER_NAME="httpdispatcher"
IMAGE_NAME="wollud1969/httpdispatcher" IMAGE_NAME="wollud1969/httpdispatcher"
VERSION="latest" 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 if [ "$MAINADDR" = "" ]; then
MAINDEV=`ip route list match default | sed -e 's/^default.*dev \(\S\+\)\( \S\+\)\? \?$/\1/'` 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}'` MAINADDR=`ip addr list dev $MAINDEV | awk '/inet / {print $2}' | awk -F/ '{print $1}'`
@ -12,6 +22,8 @@ docker run \
-d \ -d \
-p 80:80 \ -p 80:80 \
-p 443:443 \ -p 443:443 \
-v $VOLUME_CONFIG:/usr/local/apache2/conf/editable \
-v $VOLUME_LOGS:/usr/local/apache2/logs \
--add-host servicehost:$MAINADDR \ --add-host servicehost:$MAINADDR \
--name $CONTAINER_NAME \ --name $CONTAINER_NAME \
--restart always \ --restart always \