mirror of
https://github.com/friendica/docker
synced 2025-12-07 22:07:09 +01:00
Now with apache AND fpm images variants client IP logging
This commit is contained in:
parent
6936b58731
commit
e7a5c33069
1 changed files with 7 additions and 2 deletions
|
|
@ -150,8 +150,13 @@ RUN set -ex; \
|
|||
} > /usr/local/etc/php/conf.d/friendica.ini; \
|
||||
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
|
||||
\
|
||||
# Only append this client IP log settings to FPM image variants
|
||||
if [ "%%VARIANT%%" != "apache" ]; then echo 'access.format = "%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' 1>> /usr/local/etc/php-fpm.d/docker.conf; fi; \
|
||||
# Set remote client IP logging for apache and fpm image variants
|
||||
if [ "%%VARIANT%%" != "apache" ]; then \
|
||||
echo 'access.format = "%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' 1>> /usr/local/etc/php-fpm.d/docker.conf; \
|
||||
else \
|
||||
cat /etc/apache2/apache2.conf | sed 's/LogFormat "%h/LogFormat "%{X-Forwarded-for}i/' > /tmp/apache2.conf; \
|
||||
cat /tmp/apache2.conf > /etc/apache2/apache2.conf ; rm -f /tmp/apache2.conf; \
|
||||
fi; \
|
||||
\
|
||||
mkdir /var/www/data; \
|
||||
chown -R www-data:root /var/www; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue