I have nginx in front of graylog, accessible under a subpath using the instructions at https://docs.graylog.org/en/latest/pages/configuration/web_interface.html#making-the-web-interface-work-with-load-balancers-proxies .
Clicking a stream such as "All messages" when not using a subpath will load a page at https://hostname.tld/streams/000000000000000000000001/search which is essentially the search page with the stream selected. This should also work when using a subpath.
When clicking the stream name from the streams page when graylog is under a subpath I see the "page not found" page.
The rest of the application appears to be working normally.
he @s1shed
what is your nginx configuration look like? Did you include the rewrite?
Hi,
My nginx config is practically the same as what's documented other than
/gl/ as the subpath instead of /graylog/ ; andproxy_set_header X-Forwarded-Proto $scheme; (the problem existed without this line) location /gl/ {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
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/gl/;
rewrite ^/gl/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:9000;
}
```
and the related config from the file `docker-compose.yml`
environment:
- GRAYLOG_HTTP_EXTERNAL_URI=https://mydomain.tld/gl/
```
As said earlier, the other parts of the application appear to be functional for me when using nginx as a reverse proxy.
I do not see this behaviour when I access the application at http://127.0.0.1:9000 directly.

FYI
You can reproduce this bug without a proxy by simply putting a subpath in these server.conf values:
http_publish_uri = http://example.com:9000/subpath/
http_external_uri = http://example.com:9000/subpath/
me too, why I did the update... ;)
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: monitoring-ingress
namespace: monitoring
annotations:
kubernetes.io/ingress.class: nginx
# kubernetes.io/ingress.allow-http: "false" gce only
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/lua-resty-waf: "active"
#nginx.ingress.kubernetes.io/lua-resty-waf: "simulate"
nginx.ingress.kubernetes.io/lua-resty-waf-allow-unknown-content-types: "true"
nginx.ingress.kubernetes.io/lua-resty-waf-ignore-rulesets: "41000_sqli"
spec:
tls:
- hosts:
- <secret>
secretName: tls-secret
rules:
- host: <secret>
http:
paths:
- backend:
serviceName: graylog3
servicePort: 9000
path: /gray/(.*)
- backend:
serviceName: prom-operator-grafana
servicePort: 3000
path: /(.*)
and
- name: GRAYLOG_HTTP_EXTERNAL_URI
value: <secret>/gray/
Wow!
I have been back and forth with this: https://community.graylog.org/t/stream-page-not-found-gorilla/13898/6
Was going to report but I guess it's done!
FYI: streams work when you do not use a subdirectoy in nginx.
Nice!
Thanks, @s1shed, @zoledian, @cubed-it & @davama for reporting this issue and supporting us debugging it.
I have found the underlying cause and created a PR for it, that is going into the next patch release of Graylog, hopefully being released soon.
Perfect in 3.2.2 :+1:
Most helpful comment
Thanks, @s1shed, @zoledian, @cubed-it & @davama for reporting this issue and supporting us debugging it.
I have found the underlying cause and created a PR for it, that is going into the next patch release of Graylog, hopefully being released soon.