Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log are sent only for one virtual domain. #21

Open
artakami opened this issue Jan 2, 2022 · 0 comments
Open

log are sent only for one virtual domain. #21

artakami opened this issue Jan 2, 2022 · 0 comments

Comments

@artakami
Copy link

artakami commented Jan 2, 2022

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]

  1. <VirtualHost *:443> -- main virtualhost
**** ServerName www.myserver.am ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant