I have Graylog setup and running and can access it on the server’s IP (e.g., 10.10.2.29:9000).
I’d rather not install Nginx on the Graylog server, since I have a separate server that is running Nginx with Let’s Encrypt and a reverse proxy. I can successfully access other services with this reverse proxy.
I would like to setup Graylog to run on a subdirectory (e.g., https://nginx02.internal.server.com/graylog). I’ve seen these examples, but I don’t know what to set in the Graylog server.conf file to make this work.
My applicable server.conf settings (I can post the entire config if needed).
http_bind_address = 10.10.2.29:9000
My Nginx config. Do I have the correct settings here?
server {
listen 443 ssl http2;
server_name internal.server.com;
#SSL/TLS settings
include /etc/nginx/sites-available/_ssl.conf;
ssl_certificate /etc/letsencrypt/live/internal.server.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/internal.server.com/privkey.pem;
ssl_dhparam /etc/nginx/ssl/nginx02/dhparam4096.pem;
root /var/www/dashboard;
autoindex off;
index index.php index.html;
location /graylog/ {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Graylog-Server-URL https://$server_name/graylog/;
rewrite ^/graylog/(.*)$ /$1 break;
proxy_pass http://10.10.2.29:9000;
}
}