Closed cry0genic closed 2 months ago
Hey @vital987, following up on this, any chance you can help me out here?
Thanks!
Hey @vital987, following up, do let me know if you can help me out here.
Thanks!
Hello @cry0genic, apologies for the delay, currently am busy in some other work. I will follow up after getting free.
Hey @vital987, if you're free now do check this issue out. Thanks!
Hey, upon using reverse proxy, I was able to get the web-ui screen but wasn't able to connect to websockify, the issue is, websockify uses client host URL to connect to it's websocket endpoint and upon reverse proxying, it picks up the address of nginx server and tries to connect to ws://nginx-server/websockify, which isn't the case, hence I don't think it's easily posible.
This fixed it:
nginx conf:
# nginx/nginx.conf
upstream chrome {
server chrome-novnc:8080;
}
server {
listen 80;
listen [::]:80;
location / {
proxy_pass http://chrome;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
and
docker-compose.yml:
version: '3.4'
services:
chrome-novnc:
container_name: chrome-novnc
environment:
- VNC_PASS=${VNC_PASS-CHANGE_IT}
- VNC_TITLE=${VNC_TITLE-Chromium}
- VNC_SHARED=${VNC_SHARED-true}
- VNC_RESOLUTION=${VNC_RESOLUTION-1280x720}
- PORT=8080
image: vital987/chrome-novnc:latest
expose:
- 8080
ports:
- "${HOST_PORT-8080}:8080/tcp"
- "4444:4444"
restart: always
networks:
- streaming
shm_size: 3g
nginx:
container_name: nginx
image: nginx:mainline-alpine
restart: always
ports:
- 80:80
volumes:
- ./nginx:/etc/nginx/conf.d
depends_on:
- chrome-novnc
networks:
- streaming
networks:
streaming:
external: true
Hey @vital987, sorry to trouble you again. When I'm trying to reverse proxy the current setup via Nginx, I'm getting an error with code 1006.
Can you help me figure out why this is happening and if possible help resolve this?
Here's the code I'm trying:
docker-compose:
./nginx/nginx.conf:
Then I'm going to
http://localhost:1337/?password=CHANGE_IT
Thanks!