diff --git a/webserver.Dockerfile b/webserver.Dockerfile index 1b63d74..82b6f7a 100644 --- a/webserver.Dockerfile +++ b/webserver.Dockerfile @@ -1,43 +1,27 @@ -FROM httpd:2.4 +FROM php:8.3-apache -# Enable required modules -RUN sed -i \ - -e 's/^#LoadModule rewrite_module/LoadModule rewrite_module/' \ - -e 's/^#LoadModule headers_module/LoadModule headers_module/' \ - -e 's/^#LoadModule autoindex_module/LoadModule autoindex_module/' \ - -e 's/^#LoadModule alias_module/LoadModule alias_module/' \ - -e 's/^#LoadModule proxy_module/LoadModule proxy_module/' \ - -e 's/^#LoadModule proxy_http_module/LoadModule proxy_http_module/' \ - -e 's/^#LoadModule ssl_module/LoadModule ssl_module/' \ - /usr/local/apache2/conf/httpd.conf +# Enable the Apache modules still needed +RUN a2enmod rewrite headers autoindex alias -# Configure autoindex + icons + .htaccess + unrestricted reverse-proxy permissions +# Configure autoindex + icons + .htaccess + UTF-8 RUN printf '\n# --- Custom for file listing + .htaccess ---\n\ AddDefaultCharset UTF-8\n\ \n\ -Include conf/extra/httpd-autoindex.conf\n\ +Include /etc/apache2/mods-enabled/autoindex.conf\n\ \n\ -Alias /icons/ "/usr/local/apache2/icons/"\n\ -\n\ +Alias /icons/ "/usr/share/apache2/icons/"\n\ +\n\ Require all granted\n\ \n\ \n\ # Autoindex settings\n\ IndexOptions FancyIndexing FoldersFirst NameWidth=*\n\ \n\ -\n\ +\n\ Options Indexes FollowSymLinks\n\ IndexIgnore _*\n\ AllowOverride All\n\ Require all granted\n\ -\n\ -\n\ -# Allow RewriteRule [P] from trusted .htaccess files\n\ -ProxyRequests Off\n\ -ProxyVia Off\n\ -SSLProxyEngine on\n\ -\n\ - Require all granted\n\ -\n' >> /usr/local/apache2/conf/httpd.conf +\n' >> /etc/apache2/apache2.conf EXPOSE 80