Files
files/webserver.Dockerfile
Ludwig Lehnert 468974927c initial commit
2026-01-12 16:16:35 +01:00

25 lines
864 B
Docker

FROM httpd:2.4
# Enable modules + configure DocumentRoot permissions, .htaccess, and icons for autoindex
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/' \
/usr/local/apache2/conf/httpd.conf \
&& printf '\n# --- Custom for file listing + .htaccess ---\n\
Include conf/extra/httpd-autoindex.conf\n\
\n\
Alias /icons/ "/usr/local/apache2/icons/"\n\
<Directory "/usr/local/apache2/icons">\n\
Require all granted\n\
</Directory>\n\
\n\
<Directory "/usr/local/apache2/htdocs">\n\
Options Indexes FollowSymLinks\n\
AllowOverride All\n\
Require all granted\n\
</Directory>\n' >> /usr/local/apache2/conf/httpd.conf
EXPOSE 80