GrayLog Nginx Reverse Proxy Https

Hi everyone!
I am new with Graylog Server
And for now I have Biggets probmle.
I installed graylog on my VPS (Ubuntu 18.04) all be fine, but when I want to use some loader balance behind graylog as nginx reverse proxy with https, I have error, my graylog server started all ok, but sometimes when I work with my graylog server I have some errors - “The connection has timed out”, “api does not respond” and other…
Where I had mistake???
My craylog server.conf is very simple and default:
# Default: 127.0.0.1:9000
http_bind_address = 127.0.0.1:9000
# Default: $http_publish_uri
#http_external_uri = $http_publish_uri
My nginx reverse proxy config (I want to use https for graylog web-interface) is:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mydomen.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/mydomen.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomen.com/privkey.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off;

    # intermediate configuration
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:sECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers off;

    # HSTS (ngx_http_headers_module is required) (63072000 seconds)
    add_header Strict-Transport-Security "max-age=63072000" always;
    location /
    { 
      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/;
      proxy_pass       http://127.0.0.1:9000;
    }
}
server {
    listen 80;
    listen [::]:80;
    server_name mydomen.com;
    return 301 https://$host$request_uri;
}

Is it correct config for graylog server when I use ngixn reverse proxy https
I read this manuals:
https://docs.graylog.org/en/3.2/pages/configuration/web_interface.html#configuring-webif-nginx
Do I change http_external_uri from default to my domen name?
And What is correct config for this
Thx

Forget to read forum’s rules. Check it, and format you message.

Does you graylog and nginx are on the same server?

I suggest start a basic nginx config, and if it’s working start to add extras. Check graylog docs for basic config.
You don’t need any special thing in graylog config.
Check your nginx logs, and tcpdump on port 9000.

Thx for your answer
Yes, Graylog and nginx onthe same server
Do I must change http_bind_address or $http_publish_uri ?

Honestly, I don’t know :slight_smile:
I use every time the http_bind_address only, and It is working with nginx without problem.

Ok
In my situation I must use 127.0.0.1:9000?

it should be ok.
That tells the tcpdump?

Thx
All is done
Work
But sometimes I have this errors:
PRD end of file and other, which comunicate with SSL config

@macko003
Can you help me, for now I have this kind of error:

Server currently unavailable

https://mydomen.com/api/cluster/metrics/multiple
And all is top, but after few minutes all is great and working !

First. it is a community support. I did this in my spare time…

Check this with and without proxy.
And use google or community search. There were some bug ith metrics, but I’m not sure which version related, and what is the status, and this error is related or not.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.