First download Nginx Proxy Manager
This tutorial assumes you are using nginx proxy manager docker image.
After setup add default configuration:
Create 2 files with content:
Included at the top of the main http block
/opt/docker/nginx-proxy-manager/data/nginx/custom/http_top.conf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
Included at the end of every proxy server block:/opt/docker/nginx-proxy-manager/data/nginx/custom/server_proxy.conf
location /websocket {
proxy_pass http://127.0.0.1:8072;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
proxy_cookie_flags session_id samesite=lax secure; # requires nginx 1.19.8
}
Check if port 8072 is opened:
sudo netstat -atlp | grep 8072