Closed ken8521 closed 9 months ago
Well I ain't no expert, but...
Have you considered running wetty with '--base /' and then using the proxy_pass without /wetty in it?
Because... wetty expects all its' requests to come with /wetty/ prefix, and builds its' paths according to it. But when you map / to /wetty in Nginx, essentially when user goes to / it is forwarded to /wetty so the app starts to load (as the right HTML is sent to the client), but then when the app asks for /wetty/whatever, your config, IMO, actually makes it go to /wetty/wetty/whatever from the wetty service perspective.
If you do want the /wetty/ in your URLs (though it doesn't make sense to me if you gave it a unique hostname instead...), I think the proper way to reverse-proxy this in Nginx would be to use 'location /wetty' to redirect to the proxy_pass you've chosen, and then have another 'location = /' that would have a single redirect directive to redirect people who hit the / URL into /wetty/
Hope this helps...
@shimile assessment sounds correct please report back if it helps
I moved on to another solution, but just happened to see this and never saw the answer that was posted until a few minutes ago. I didn't notice the -b switch I could use when I tried this the first time.
docker run --restart=always --name=wetty -p 3000:3000 wettyoss/wetty --ssh-host=192.168.1.166 -b
Seems to have done the trick and I can reverse proxy through swag w/ the subdomain.conf I posted above.
Thanks!
Thanks
Stale issue message
Not sure if this is a bug or a feature request (I suspect the later)...
I'm trying to reverse proxy wetty through linuxserver/swag. The container works fine locally at ip:3000/wetty. I add it to my swag network, I then create a wetty.subdomain.conf file (see below), restart swag, then restart wetty... but then I just get what looks like a windows explorer window that says "reconnecting" over and over till I close the tab. I suspect this is because I can't add the /wetty to the end of the $upstream port in the subdomain.conf file. I'm assuming this would work fine on subfolder, but my preference is to use subdomains.
Any suggestion would be greatly appreciated. Edit: I'm not sure why the below split into 3 sections, but it's all there. If you'd like to look at it w/o the weird formatting, here's a pastebin of the file. https://pastebin.com/AvVurN3i