diff --git a/Containers/domaincheck/Dockerfile b/Containers/domaincheck/Dockerfile index 39722f26..f81f548c 100644 --- a/Containers/domaincheck/Dockerfile +++ b/Containers/domaincheck/Dockerfile @@ -5,7 +5,8 @@ RUN adduser -S www-data -G www-data RUN rm -rf /etc/lighttpd/lighttpd.conf COPY lighttpd.conf /etc/lighttpd/lighttpd.conf RUN chmod +r -R /etc/lighttpd && \ - chown www-data:www-data -R /var/www + chown www-data:www-data -R /var/www && \ + chown www-data:www-data /etc/lighttpd/lighttpd.conf COPY start.sh / RUN chmod +x /start.sh diff --git a/Containers/domaincheck/lighttpd.conf b/Containers/domaincheck/lighttpd.conf index a2ff1e5b..8b2bb842 100644 --- a/Containers/domaincheck/lighttpd.conf +++ b/Containers/domaincheck/lighttpd.conf @@ -5,8 +5,6 @@ server.port = env.APACHE_PORT server.username = "www-data" server.groupname = "www-data" -server.use-ipv6 = "enable" - mimetype.assign = ( ".html" => "text/html", ".txt" => "text/plain", @@ -15,4 +13,8 @@ mimetype.assign = ( ) static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" ) -index-file.names = ( "index.html" ) \ No newline at end of file +index-file.names = ( "index.html" ) + +$SERVER["socket"] == "ipv6-placeholder" { + server.document-root = "/var/www/domaincheck/" +} diff --git a/Containers/domaincheck/start.sh b/Containers/domaincheck/start.sh index 80744830..d9186030 100644 --- a/Containers/domaincheck/start.sh +++ b/Containers/domaincheck/start.sh @@ -11,6 +11,9 @@ if [ -z "$APACHE_PORT" ]; then export APACHE_PORT="443" fi +CONF_FILE="$(sed "s|ipv6-placeholder|\[::\]:$APACHE_PORT|" /etc/lighttpd/lighttpd.conf)" +echo "$CONF_FILE" > /etc/lighttpd/lighttpd.conf + # Check config file lighttpd -tt -f /etc/lighttpd/lighttpd.conf