apache-mod_log_gelf
apache-mod_log_gelf copied to clipboard
log are sent only for one virtual domain.
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"
- <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>
- <VirtualHost *:443> -- main virtualhost
** ** ServerName www.myserver.am ...