We are currently spinning up small docker containers containing PSU, and then publishing a few dashboards publicly (The security part is taken care of - ACLs, restricted public IP access, etc)
We can access the admin panel directly if we connect to hostname.publicdomain.com - but if we want to connect to the Apps / Dashboards, the site never really loads:
All other sites behind the Nginx reverse proxy is working as well as the admin page.
Does anyone have some knowledge, on how get PSU to work behind a reverse proxy?
I have been trying to get this working too for my Laptop Dev builds.
I have generated a self-signed cert, however getting nginx to use it has been problematic.
I did receive the WebSockets problem and research advised this was the fix:
location /myfolder/ {
alias /path/to/root/directory/myfolder/;
index index.html;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# WebSocket proxying
proxy_pass http://myapp-container:5000; # Use your actual container name and port
}
The key settings here are:
proxy_http_version 1.1;: This setting ensures that HTTP/1.1 is used, which is required for WebSocket support.
proxy_set_header Upgrade $http_upgrade;: This tells Nginx to upgrade the connection to WebSocket if it detects the Upgrade header in the request.
proxy_set_header Connection āupgradeā;: This sets the Connection header to āupgradeā to indicate a WebSocket connection.
proxy_pass http://myapp-container:5000;: This line specifies the address of your WebSocket server. Replace myapp-container with the actual name of your container running the WebSocket server, and 5000 with the correct port.
This is something I have on the backlog to figure out. I would be keen to know if you get this working.
Thanks for the info. My docker envionment is a compose script consisting of 2 containers. One being PSU and the other being the image: nginx. I have a confg file mounted as:
I will have a look at the proxy manager and see if it helps me as im trying to figure this out using a pure text config file which is not the easiest way!
I have my PSU instance running on a synology NAS via a docker container, and Iām using the reverse proxy functionality of synologyās DSM operating system, which I believe under the hood is just nginx.
It works fine once Iād muddled my way through the setup:
Couple of things I had to do in the proxy:
enable HSTS
ensure the correct headers are enabled for websockets: