Skip to content

Commit

Permalink
Show real client remote IP in logs instead of internal container’s IP
Browse files Browse the repository at this point in the history
  • Loading branch information
m33m33 committed Feb 8, 2025
1 parent 9fd34d4 commit 93e2020
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 2024.12/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ RUN set -ex; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > /usr/local/etc/php/conf.d/friendica.ini; \
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
\
echo 'access.format ="%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' >> /usr/local/etc/php-fpm.d/docker.conf; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
Expand Down
2 changes: 2 additions & 0 deletions 2024.12/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ RUN set -ex; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > /usr/local/etc/php/conf.d/friendica.ini; \
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
\
echo 'access.format ="%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' >> /usr/local/etc/php-fpm.d/docker.conf; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
Expand Down
2 changes: 2 additions & 0 deletions 2025.02-dev/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ RUN set -ex; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > /usr/local/etc/php/conf.d/friendica.ini; \
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
\
echo 'access.format ="%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' >> /usr/local/etc/php-fpm.d/docker.conf; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
Expand Down
2 changes: 2 additions & 0 deletions 2025.02-dev/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ RUN set -ex; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > /usr/local/etc/php/conf.d/friendica.ini; \
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
\
echo 'access.format ="%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' >> /usr/local/etc/php-fpm.d/docker.conf; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ RUN set -ex; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > /usr/local/etc/php/conf.d/friendica.ini; \
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
\
echo 'access.format ="%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' >> /usr/local/etc/php-fpm.d/docker.conf; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ RUN set -ex; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > /usr/local/etc/php/conf.d/friendica.ini; \
ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini; \
\
echo 'access.format ="%{HTTP_X_FORWARDED_FOR}e - %u %t \"%m %r\" %s"' >> /usr/local/etc/php-fpm.d/docker.conf; \
\
mkdir /var/www/data; \
chown -R www-data:root /var/www; \
Expand Down

0 comments on commit 93e2020

Please sign in to comment.