Need help configuring Coder WebSocket behind a proxy with non-standard ports
Sorry for the inconvenience I made. I don't have access to the standard ports (port 80 and port 443) on my cloud instance. ðŸ˜
I use Nginx to proxy coder from internal port 7080 to external port 1234.
Everything works perfectly fine, except for the logs session. Coder isn't showing any of the logs, including the workspace building logs and the template building logs.
As the image shows, my WebSocket connection had successfully established in the workspace health check page.
I checked my browser console, and there is always messages indicating that connection to WebSocket failed:
-
WebSocket connection to 'wss://example.com:1234/api/v2/templateversions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/logs?follow=true' failed:
- Error: Connection for logs failed. at WebSocket.<anonymous>
There were no error logs in the coder container log:
15 Replies
This is my Nginx proxy config (Using Nginx Proxy Manager). As you can see, WebSocket is enabled.
Here's a human-readable nginx proxy config:
hey @Katorly could you click the arrow for one of these and send a screenshot?
thanks for the really detailed issue by the way! :-)
Hello, thanks for the reply.
Here is the screenshot.
hello, sorry for the delay
did you get this sorted out?
it seems like you have two nested
location /
blocks, maybe this is the issueThanks for pointing out this issue, however, after removing the extra
location /
, the problem still exist. Here is the new nginx proxy config, if you want to see whether I removed it or not:
hey @Katorly, sorry for the lack of answers, did you figure this out?
I didn't figure it out. Maybe is that I don't know much about this Nginx and WebSocket stuff...
i'm not sure how to assist either, sorry
oh wait
you have the same header twice
try removing the first block that has
Thanks for mentioning, however, removing them didn't help; I have removed and added some of them one by one a few days ago, but none of them resolve the issue.
I guess I'll need to leave the issue aside for now. 😢
sorry for not being able to help
as a last resort, maybe try removing the exploit blocking stuff to see if it is blocking anything?
That doesn't resolve the issue either.
Nevermind, in addition to making templates, logs are not so necessary.
Thanks for your help!
please let me know if you ever figure this out!
@Phorcys closed the thread.