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

Proxypass using Nginx proxy manager #76

Closed
andzejsp opened this issue Apr 13, 2023 · 5 comments
Closed

Proxypass using Nginx proxy manager #76

andzejsp opened this issue Apr 13, 2023 · 5 comments

Comments

@andzejsp
Copy link
Contributor

I have run the app.py with --host 0.0.0.0 and can access the web ui from local machines, but when i try to proxypass and access it from domain, it shows in the console that the "GET / HTTP/1.1" 200 - but the web page is not loading. I mean its loading forever, but i cant access it.

All it shows is this.

image

My proxy custom settings are:

location /gpt4all/ {
		rewrite ^/gpt4all(/.*)$ /$1 break;
		proxy_pass http://192.168.0.210:9600;
		proxy_http_version 1.1;
		auth_basic "Authorization required";
		auth_basic_user_file /data/access/1;
		proxy_set_header Authorization "";
		proxy_set_header Connection "";
	}

For other sites this setup is working, here i dont know why its not.

I tried enabling websocket support, but that didnt help
Im by no means an expert in nginx, All my knowledge comes from googling around for solutions, given if i ask the right questions :)

Any help would be appreciated.

@ParisNeo
Copy link
Owner

Can you try with the latest version?

@andzejsp
Copy link
Contributor Author

Still not working, i think its my fault, because i have no idea or understanding on how to proxypass with a sub path.

like i want example.com/gpt4all/ to proxy into local http://192.168.0.210:9600/

But it seems that the page loads but the assets are still trying to pull from base url wich is example.com and not example.com/gpt4all/
I removed the real domain from picture for safety.
image

@ParisNeo
Copy link
Owner

I am sorry for that. I don't have much experience with proxies.
If you find a solution or if someone from the community can help, feel free to post your solution.

Thnx

@zodiacg
Copy link

zodiacg commented Apr 14, 2023

Unless the proxied app explicitly states it supports running from a sub path, don't proxypass it with a sub path. Prefix stripping is not enough.

As you already noticed, normally frontend developers use '/'-starting uris to pull the resources the root path. If sub path needs to be supported, the frontend part will need a revamp to add a configurable path name before every resource uri.

@andzejsp
Copy link
Contributor Author

That is what i was afraid of, thank you for explaining.

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