Modify httpd-ahssl.conf to Prevent non-https Custom Log Entries

Started by mpfrench, December 17, 2015, 04:55:21 PM

Previous topic - Next topic

mpfrench

The way httpd-ahssl.conf is shown now, it logs http as well as https connections.  You should modify it to log only https connections since this is an SSL-only configuration file.  This mod can be accomplished by adding the following to the end of the CustomLog configuration:  expr=%{HTTPS}=="on"

Gregg

CustomLog "${SRVROOT}/logs/ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" env=HTTPS


Simple env=HTTPS should work also, I've made this change in httpd-ahssl.conf for 2.4.19.
Thanks for pointing this out.