graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

Graylog 6.0 browsing fails with nginx https reverse proxy and path prefix

Open hydrapolic opened this issue 1 year ago • 2 comments

Expected Behavior

Browsing the web UI should work fine.

Current Behavior

The links are: https://log.domain.tld/graylog/graylog/search https://log.domain.tld/graylog/graylog/streams

Which ends up with a "Page not found".

Possible Solution

Steps to Reproduce (for bugs)

  1. Login and try to browse the UI

Context

I'm trying to create a new setup with Graylog 6 behind nginx reverse proxy with a path prefix and https. This setup works for Graylog 5.2, but fails for Graylog 6.0.

The problem is that after login, the links are: https://log.domain.tld/graylog/graylog/search https://log.domain.tld/graylog/graylog/streams

Which ends up with a "Page not found".

server_name log.domain.tld;

location /graylog/ {
  proxy_set_header Host $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://$host/graylog/;
  rewrite ^/graylog/(.*)$ /$1 break;
  proxy_pass http://graylog:9000;
}

After removing the path prefix (serving directly from /) it works fine.

Your Environment

  • Graylog Version: 6.0.0-rc.4-1
  • Java Version: 17.0.11
  • OpenSearch Version: 2.13.0
  • MongoDB Version: 7.0.8
  • Operating System: Linux Gentoo / Docker
  • Browser version: Chromium 122.0.6261.128

hydrapolic avatar Apr 30 '24 13:04 hydrapolic

Thanks for the report @hydrapolic! It looks like this is the same issue as https://github.com/Graylog2/graylog2-server/issues/18463.

thll avatar Apr 30 '24 16:04 thll

Yes, thanks @thll, missed that one.

hydrapolic avatar May 02 '24 06:05 hydrapolic

Duplicate of #18463

mpfz0r avatar May 20 '24 15:05 mpfz0r