docker/apaches/Dockerfile
thopic af089cd6a7
[PHP] Bump to 7.4.33 + install intl php ext
PHP extension required to use new function
(see d0ee343b45)
2023-08-09 12:34:53 +02:00

21 lines
783 B
Docker

from php:7.4.33-apache
RUN apt-get update && apt-get install -y \
git \
libicu-dev\
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& rm -rf /var/lib/apt/lists/*
RUN printf "[safe]\n\tdirectory = /var/www\n" > /etc/gitconfig
RUN a2enmod remoteip rewrite \
&& echo "RemoteIPHeader X-Forwarded-For" > /etc/apache2/conf-available/remoteip.conf \
&& a2enconf remoteip \
&& sed -i -r 's/^ServerTokens .*/ServerTokens Prod/g' /etc/apache2/conf-available/security.conf \
&& sed -i -r 's/^ServerSignature .*/ServerSignature Off/g' /etc/apache2/conf-available/security.conf \
&& sed -i -E 's/^LogFormat "%h(.*)/LogFormat "%a\1/g' /etc/apache2/apache2.conf \
&& echo "expose_php = Off" > /usr/local/etc/php/conf.d/php_version.ini
CMD ["apache2-foreground"]