Skip to content

Commit 353e656

Browse files
committed
trying to harden Apache ServerTokens more
1 parent 8c4edbf commit 353e656

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ RUN { \
4444
COPY etc/apache-vhost.conf /etc/apache2/sites-enabled/000-default.conf
4545
COPY etc/php.ini /usr/local/etc/php/php.ini
4646

47-
RUN echo "ServerTokens Prod\nServerSignature Off" >> /etc/apache2/conf-available/harden.conf && \
48-
a2enconf harden
47+
# For PCI scans this disables all our Apache information no matter how the scanner tries
48+
# to scan stuff, and trust me they do weird stuff I had to dig for to make it work.
49+
# See this for more information: https://github.com/proudcity/pc-dev-issues/issues/125
50+
RUN echo "ServerTokens Prod\nServerSignature Off" > /etc/apache2/conf-available/harden.conf && \
51+
a2enconf harden && \
52+
a2disconf security
53+
4954

5055
RUN mkdir -p /app
5156
COPY composer.json /app/

0 commit comments

Comments
 (0)