Graylog with Nginx reverse proxy blank web interface

Hello Everyone,

I just install and configure Graylog with Nginx reverse proxy to a remote ubuntu server. I tested Graylog web interface before I install and configure Nginx and Graylog web interface works fine. After I include Nginx I still can connect the port I specified for Nginx which is 7777 but there is just a blank white page with “Graylog web interface” header.
My Nginx configuration is shown below.

server

{
listen 7777 default_server;
listen [::]:7777 default_server ipv6only=on;
server_name graylog.example.org;

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 http://$server_name/;
  proxy_pass       http://127.0.0.1:9000;
}

}

Hmmmm, I’m having a similar issue, though I’ve configured the reverse proxy to use HTTPS:

server {
  listen *:80;
  server_name           logs.example.com;

  return 301            https://$host$request_uri;
  access_log            /var/log/nginx/logs.example.com.access.log combined;
  error_log             /var/log/nginx/logs.example.com.error.log;
}

server {
  listen       *:443 ssl;
  server_name  logs.example.com;

  ssl_certificate           /etc/nginx/ssl/fullchain.pem;
  ssl_certificate_key       /etc/nginx/ssl/privkey.pem;
  ssl_session_cache         shared:SSL:10m;
  ssl_session_timeout       5m;
  ssl_protocols             TLSv1.2;
  ssl_ciphers               ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
  ssl_prefer_server_ciphers on;

  index  index.html index.htm index.php;

  access_log /var/log/nginx/ssl-logs.example.com.access.log combined;
  error_log  /var/log/nginx/ssl-logs.example.com.error.log;

  location / {
    proxy_pass http://logs.example.com:9000;
    proxy_read_timeout 90;
    proxy_connect_timeout 90;
    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/api;
  }
}

The logs in /var/log/nginx don’t seem to give much info, and neither do the logs in /var/log/graylog-server. I suspect there’s just something missing, but I’m at a bit of a loss.

1 Like

Also seeing a ton of errors in the developer console, so I’m not sure if that has anything to do with it:

I’m not an expert, but I have NGINX proyxing Graylog (from a subdirectory path) successfully.

@aaronsachs, try removing api from the end of the X-Graylog-Server-URL header, e.g.

  proxy_set_header X-Graylog-Server-URL https://$server_name;

@denizilhan, it would be good to know what your HTTP settings are in your server.conf file, specifically

http_bind_address
http_publish_uri
http_external_uri
trusted_proxies

Also, are there any 404s appearing in your browser network logs?

Ah! That did it. <3 thanks a ton!

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