Logging HTTP and HTTPS requests in one file
I am trying to log HTTP and HTTPS requests in one file per virtual host on a server and need some help. Currently, it only logs HTTP access requests and HTTP error requests. It doesn't pick up the SSL access requests or the SSL error requests. I will include some parts of the config files. syslog-ng.conf --------------------- filter fd_httpd_test.abc.com { (match("logger:") and match("test.abc.com")) or (match("httpd[\[0-9]+\]") and match("/websites/abc/test")); }; filter f_terms { not match("httpd[\[0-9]+\]") and not match("logger:"); }; The f_terms filter is for a catchall filter that catches things not specified to go to a certain file. httpd.conf -------------- ErrorLog syslog LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" commonvhost CustomLog "|/usr/bin/logger" commonvhost <VirtualHost *:80> ServerName test.abc.com ServerAdmin root@localhost DocumentRoot /websites/abc/test Redirect / https://test.abc.com/ </VirtualHost> <VirtualHost *:443> ServerName test.abc.com ServerAdmin root@localhost DocumentRoot /websites/abc/test </VirtualHost> ssl.conf ------------ ErrorLog syslog LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" commonvhost CustomLog "|/usr/bin/logger" commonvhost Let me know when the problem lies. Phusion
participants (1)
-
Phusion