Skip to content

Commit

Permalink
Modify LogFormat (#337)
Browse files Browse the repository at this point in the history
* Modify LogFormat

modify LogFormat to include the client ip and explicitly highlight -combined vs -forwarded

* Update salt/hg/config/remoteip.apache.conf.jinja

Co-authored-by: Ee Durbin <ee@python.org>

* Update salt/hg/config/remoteip.apache.conf.jinja

Co-authored-by: Ee Durbin <ee@python.org>

---------

Co-authored-by: Ee Durbin <ee@python.org>
  • Loading branch information
cegerhardson and ewdurbin committed Jan 18, 2024
1 parent e93bdf1 commit d633151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/hg/config/remoteip.apache.conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ LoadModule remoteip_module modules/mod_remoteip.so
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded

# Define 'combined' and 'forwarded' log formats
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" forwarded
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" |%h|%a|%{X-Forwarded-For}i| -combined" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" |%h|%a|%{X-Forwarded-For}i| -forwarded " forwarded

# Specify location of error log file
ErrorLog ${APACHE_LOG_DIR}/error.log
Expand Down

0 comments on commit d633151

Please sign in to comment.