Skip to content

Commit 39846a9

Browse files
committed
Prevent showing PHP errors via HTTP
1 parent 6b06afd commit 39846a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ RUN apt-get update && \
1919
ENV APACHE_DOCUMENT_ROOT /app
2020

2121
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
22-
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
22+
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf && \
23+
echo "ServerTokens Prod" > /etc/apache2/conf-enabled/z-server-tokens.conf && \
24+
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
2325

2426
RUN a2enmod rewrite
2527

0 commit comments

Comments
 (0)