tariqbuilds / linux-dash

A beautiful web dashboard for Linux

Home Page:https://afaqurk.github.io/linux-dash/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nginx reverse proxy with subfolder

hachel opened this issue · comments

Hi there, I read #442 and it tells you how to set up linux dash behind a nignx reverse proxy. I'm having the exact same problem as the owner of that issue but my setup is a little different so the solution doesn't apply (or at least I'm not able to implement them).

I currently have a web server with the root already set to something. My plan is to have a virtual subfolder to point to linux dash. So I would go to https://server/dash and that would point to server:8080 (linux dash node server).
I have my nginx.conf like this (accord to https://www.nginx.com/blog/websocket-nginx/):

map $http_upgrade $connection_upgrade {
	default upgrade;
	'' close;
}
.....
server {
	....
	location /dash/ {
		proxy_pass http://websocket/;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection $connection_upgrade;
	}
}

I can access server/dash and the dashbord appears but there is a loading screen on all items.

Any help would be appreciated!

So I made a docker container for linux-dash. I have an openvpn container and wanted some webui to see the networking bits. I understand that docker isolation makes most of the information useless, but I was able to get the reverse proxy bit working, with some modifications.
This nginx location
https://github.com/McGriddle/docker-linux-dash#reverse-proxy

Make these changes and 'it works'.
https://github.com/McGriddle/docker-linux-dash/blob/master/root/etc/cont-init.d/30-config#L12-L20 . Works for the nodejs installation.

wss