Skip to content

Commit 9c20eb3

Browse files
Merge pull request #612 from fmount/customlog
Fix client IP logging in Horizon VirtualHost
2 parents 65d82f7 + bc00103 commit 9c20eb3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

templates/horizon/config/httpd.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ LogLevel debug
5151
## Logging
5252
ErrorLog {{ .LogFile }}
5353
ServerSignature Off
54-
CustomLog {{ .LogFile }} "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" env=forwarded
54+
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
55+
CustomLog {{ .LogFile }} combined env=!forwarded
56+
CustomLog {{ .LogFile }} proxy env=forwarded
5557

5658
## RedirectMatch rules
5759
RedirectMatch permanent ^/$ "{{ .horizonEndpoint }}/dashboard"

0 commit comments

Comments
 (0)