Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve ns-viewer over HTTPS #210

Open
hadillivvy opened this issue May 10, 2024 · 3 comments
Open

Serve ns-viewer over HTTPS #210

hadillivvy opened this issue May 10, 2024 · 3 comments

Comments

@hadillivvy
Copy link

I have a script on the production server that launches an ns-viewer process on demand and the ns-viewer command exposes the viewer on localhost port 7007. However, this connection is always HTTP and not HTTPS. I tried different ways to secure the connection but nothing is working. Any advice on how to achieve this?

@brentyi
Copy link
Collaborator

brentyi commented May 12, 2024

@hadillivvy
Copy link
Author

Hi @brentyi

I tried the nginx reverse proxy approach and it worked but the problem is that I'm planning on launching multiple ns-viewer processes on the server and so I need to target the port in the URL as well and that's not working with HTTPS using the nginx reverse proxy approach. Is there a way to do it on my server like https://viewer.nerf.studio/ where I give it maybe the ws url or something and it displays the right nerf instead of giving it the port?

@Zunhammer
Copy link

Hi, I'm not sure if I get your problem right but nginx is able to work with different ports on the same server. You simply need to provide multiple configs listening to the different ports and then in the "proxy_pass" add the port of the ns-viewer instance. E.g.

server { # simple reverse-proxy
listen 7007;
[...]
location / {
proxy_pass http://127.0.0.1:7007;
}
}

and the next one like

server { # simple reverse-proxy
listen 7008;
[...]
location / {
proxy_pass http://127.0.0.1:7008;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants