Update Dockerfile to disable AllowOverride for production, enhance admin.php to handle missing FLIXCOOKS_ADMIN_KEY with a user-friendly error page, and remove .htaccess file. Adjust documentation to reflect these changes and clarify admin key configuration.

This commit is contained in:
2026-05-23 13:29:35 +02:00
parent 830950ad66
commit d8bb062c63
5 changed files with 32 additions and 9 deletions
+2 -2
View File
@@ -7,13 +7,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& a2enmod rewrite headers \
&& rm -rf /var/lib/apt/lists/*
# Apache: document root + AllowOverride for .htaccess
# Apache: document root, no per-directory overrides in production
ENV APACHE_DOCUMENT_ROOT=/var/www/html
RUN sed -ri 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
&& printf '%s\n' \
'<Directory /var/www/html>' \
' AllowOverride All' \
' AllowOverride None' \
' Require all granted' \
'</Directory>' \
> /etc/apache2/conf-available/flixcooks.conf \