apache-mod_log_gelf icon indicating copy to clipboard operation
apache-mod_log_gelf copied to clipboard

log are sent only for one virtual domain.

Open artakami opened this issue 3 years ago • 0 comments

Scenario two virtualhosts configured on apache for the same domain: http and https log_gelf_module forwards only 301 requests (logs from http virtualhost) to Graylog server. logs from https virtoaulhost don not get forwarded to GrayLog

below is the apache server config.

/etc/httpd/conf.modules.d/02-gelf.conf

LoadModule log_gelf_module /usr/lib64/httpd/modules/mod_log_gelf.so GelfEnabled On GelfUrl "udp://172.21.0.4:12201" GelfSource "myserver.am" GelfFacility "apache-gelf" GelfTag "apache_all" GelfCookie "tracking" GelfFields "ABDhImsvRti"

  1. <VirtualHost *:80> -- for forwarding requests to https

*<VirtualHost :80> ... ServerName www.myserver.am ... RewriteEngine on RewriteCond %{SERVER_NAME} =www.myserver.am RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>

  1. <VirtualHost *:443> -- main virtualhost
**** ServerName www.myserver.am ...

artakami avatar Jan 02 '22 16:01 artakami