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:
+2
-2
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user