For production usage please use a proxy server like NginX to handle certificate support. Add certificates for port 443.

For accessing application create a location command like this:

location remote {
proxy_pass http://127.0.0.1:6002;
proxy_cache_bypass $http_upgrade;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 10m;
proxy_read_timeout 180;
}

For web socket access from browser create this location:

location ~ /LIST|/RDP|/VNC|/LOGIN|/GATEWAY|/PLAY|/CONF|/JOIN|/CCF|/TELNET|/ECHO|/DOWNLOAD|/CLIP {
proxy_pass http://127.0.0.1:8090;
proxy_cache_bypass $http_upgrade;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 50m;
proxy_read_timeout 180;
}

Make sure that web socket access is allowed in firewall.

For printing support create this location comand:

location /.disposable {
proxy_pass http://127.0.0.1:8090/.disposable;
proxy_cache_bypass $http_upgrade;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 10m;
proxy_read_timeout 180;
}