White screen when accessed via NGINX reverse proxy

Hey everyone!

Recently decided to install Rocketchat as a Slack alternative for my friends and I, but I’m getting a white screen whenever I attempt to access the server via https through NGINX (It will still show the updated name of the server in the title bar, though). What am I missing?

You can see the output here: beard.jumpingcrab.com/rocketchat

Here’s my setup:

  1. NGINX running in Freenas jail so I can supply multiple jails/VMs with SSL. (Set up pretty much like this: https://forums.freenas.org/index.php?threads/how-to-set-up-nginx-to-reverse-proxy-your-jails-w-certbot.49876/). Cert is valid and done and tests at SSL labs to an “A+” rating.

  2. NGINX has its configuration and a proxy_setup redirecting from my domain to 192.168.1.3:3000 (my internal VM with the Rocketchat snap installed on it). Automatically redirecting to HTTPS.

I’m able to access my Rocketchat server from 192.168.1.3:3000, and I’m also able to access from my public IP, no issues.

When I attempt to access via my domain and reverse proxy, all I get is a white screen. The title of the server appears just fine at the top and is updating if I change it from the internal IP.

So, not sure what I’m missing here. Do I need NGINX on the Rocketchat server as well, or something weird like that?

Please help!

working nginx proxy config

server {
    listen        [::]:80;
    listen 80;
    server_name   rocketchat.xyz.com;
	if ($scheme = http) {
        return 301 https://$server_name$request_uri;
        }
 listen [::]:443 ssl;
 listen 443 ssl;
 server_name rocketchat.xyz.com;
 ssl_certificate /etc/letsencrypt/live/rocketchat.xyz.com/fullchain.pem;
 ssl_certificate_key /etc/letsencrypt/live/rocketchat.xyz.com/privkey.pem;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 ssl_prefer_server_ciphers on;
 ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
 root /usr/share/nginx/html;
 index index.html index.htm;
 # Make site accessible from http://localhost/
 #server_name localhost;
 location / {
     proxy_pass http://X.X.X.X:3000/;
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "upgrade";
     proxy_set_header Host $http_host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forward-Proto http;
     proxy_set_header X-Nginx-Proxy true;
     proxy_redirect off;
     client_max_body_size 200m;
     expires off;
     etag off;
     add_header Last-Modified $date_gmt;
     add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
     proxy_request_buffering off;
     proxy_buffering off;
 }
 }

Thanks for posting. Did a copy paste and modified for my domain. Can still reach it and white screen is still there:

https://beard.jumpingcrab.com/rocketchat

If I do an inspect on the page, I get this:

I’m confused as to why it can’t find these items through the proxy…

@dctheee are you following this section of the docs for running off a “sub folder”?

https://rocket.chat/docs/installation/manual-installation/running-in-a-sub-folder/