xbvr
xbvr copied to clipboard
Cannot get Heresphere to work over nginx reverse proxy
Presuming this is possible as I have seen it mentioned before, can someone provide details on what needs to be done in the nginx conf file to allow heresphere to work properly.
Any help is much appreciated
Maybe wanna ask over on the HereSphere or XBVR discords.
You will need to enable websocket support on /ws/ location, plus probably rewrite the Host request header because this is what XBVR uses in the HereSphere API responses. If you open your http://your-server:port/heresphere you will see a list of URL's to help you understand.
Short example that might help:
server {
listen 8084;
server_name your-server;
location /ws {
proxy_pass http://xbvr:9999;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
proxy_set_header Host $host:8084;
proxy_pass http://xbvr:9999;
}
}
In this example, nginx will forward requests to 'xbvr:9999' which is reachable from nginx, but not reachable from HereSphere (for example because it exists in a local docker network). In the xbvr-heresphere api output, it would print out urls like http://xbvr:9999/heresphere/ which cannot be reached, which is why you should add the proxy_set_header Host to something that it could reach.
I am not using this setup and didn't fully test it either. If you try it please let us know your findings.
hi
I am in a slightly different situation - I can get heresphere to work over reverse proxy (am using NPM docker). It did not require any extra configuration in NPM's advanced tab and it works ok. But I now wanted to add a authentication flow before it so I am trying to configure it with authentik docker. I used the following guide to set up authentik with NPM -https://geekscircuit.com/set-up-authentik-sso-with-nginx-proxy-manager.
Now I can get xbvr's web UI to load in heresphere after authentication with authentik but heresphere's web API times out/does nothing after that if I use the code mentioned in the above guide in NPM's advanced tab which is needed to first load the authentication stage; so now I cannot play any videos.
any suggestions?
TIA