Graylog behind nginx sub directory how-to configure

Ok, i created a new graylog vm with same settings as production one.

Slight difference: using / in nginx and no SSL

URL: http://graylog-lab-ecr-1/

location / {
	#rewrite ^/graylog(.*)$ $1 last;
	access_log  /var/log/nginx/graylog-access.log main;
	error_log /var/log/nginx/graylog-error.log debug;
	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/api;
	#proxy_set_header X-Graylog-Server-URL https://$server_name/api;
	proxy_set_header X-Graylog-Server-URL http://$server_name/api;
	#proxy_pass       http://127.0.0.1:9000/graylog;
	proxy_pass       http://127.0.0.1:9000;
}

I can curl it using HTTP 1.0 and 1.1 (-0 option) from the librenms and get exact same output:

curl -0 -X GET -u "config:password" -k -H 'Accept: application/json' 'http://graylog-lab-ecr-1/api/cluster' | python -m json.tool
{
    "bc808e5c-1271-4d83-b3ff-160d52e37433": {
        "cluster_id": "f19099c3-8254-452b-98ce-839c190cd960",
        "codename": "Wildwuchs",
        "facility": "graylog-server",
        "hostname": "10.x.x.x,
        "is_processing": true,
        "lb_status": "alive",
        "lifecycle": "running",
        "node_id": "bc808e5c-1271-4d83-b3ff-160d52e37433",
        "operating_system": "Linux 3.10.0-693.17.1.el7.x86_64",
        "started_at": "2018-01-30T18:28:16.803Z",
        "timezone": "UTC",
        "version": "2.4.3+2c41897"
    }
}

Curl command log output from nginx:

<ipv6> - config [30/Jan/2018:18:43:21 +0000] "GET /api/cluster HTTP/1.1" 200 421 "-" "curl/7.29.0" "-"
<ipv6> - config [30/Jan/2018:18:43:24 +0000] "GET /api/cluster HTTP/1.0" 200 421 "-" "curl/7.29.0" "-"

So this tells me that it’s more than likely a librenms issue…

Unless i missed something…

Thank you very much for the support!!

Going to go poke at the guys as librenms…hehe :smile: