# :vim set syntax apache
+# The following custom log formats may be used to log remote client IP
+# addresses when using a proxy (nginx or haproxy) in front of Apache
+# for Evergreen with the RemoteIP module (mod_remoteip). In order to
+# use this, change the last entry on the CustomLog lines below to use
+# the desired LogFormat.
+LogFormat "%a %l %u %t \"%r\" %>s %b" proxy-common
+Logformat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" proxy-combined
+
LogLevel info
# - log locally
# CustomLog /var/log/apache2/access.log combined
--- /dev/null
+Apache Proxy LogFormat Configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Two `LogFormat` entries have been added to the sample Apache
+configuration in `eg.conf.in` that are useful when a proxy runs in
+front of Evergreen's Apache. These configurations mimic the default
+"common" and "combined" log formats, but log the remote client's
+actual IP address when `mod_remoteip` is enabled. The entries are
+repeated here in case you prefer to manually update your Apache
+configuration.
+
+ LogFormat "%a %l %u %t \"%r\" %>s %b" proxy-common
+ Logformat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" proxy-combined
+
+To use these formats, simply replace the "common" or "combined" at the
+end of the `CustomLog` entries in the `eg.conf` file with either the
+"proxy-common" or "proxy-combined" entry, depending upon which you
+want to use.
+
+From:
+
+ CustomLog "|/usr/bin/logger -p local7.info" common
+
+to:
+
+ CustomLog "|/usr/bin/logger -p local7.info" proxy-common
+
+for example.