fix the lighttpd config

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-07-17 19:30:34 +02:00
parent ac9f86a525
commit cd6e0ed9d4
3 changed files with 10 additions and 4 deletions

View file

@ -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

View file

@ -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" )
index-file.names = ( "index.html" )
$SERVER["socket"] == "ipv6-placeholder" {
server.document-root = "/var/www/domaincheck/"
}

View file

@ -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