Skip to content

Commit 818d776

Browse files
committed
Do the X-Forwarded-For thing more directly.
1 parent 1479cc2 commit 818d776

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rootfs/etc/apache2/conf-available/logging.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22
ErrorLog /dev/stderr
33
TransferLog /dev/stdout
44
CustomLog /dev/stdout combined
5+
# XXX: `/etc/apache2/apache.conf` recommends against the use of
6+
# `%{X-Forwarded-For}i`, to instead use `mod_remoteip`; however, `mod_remoteip`
7+
# additionally sets `$_SERVER['REMOTE_ADDR']` that PHP uses and that
8+
# Drupal/Symfony uses for issues around being reverse proxied; therefore, let's
9+
# proceed to log `%{X-Forwarded-For}i` against the distro's recommendations.
10+
LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

0 commit comments

Comments
 (0)