-
Notifications
You must be signed in to change notification settings - Fork 5.9k
404 On files through nginx reverse proxy running code-server in a docker container #1384
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
Comments
Hm weird. It worked on previous versions? Can you try clearing your cache? |
I don't think I updated anything in this time. Maybe I did and forgot though. |
Also, this happens after I log in, the login page loads fine. |
I'm no expert with nginx (so bear with me), but it seems maybe nested paths are failing to load? |
That's odd; those files don't exist in the production build (they get
bundled into the larger workbench files).
|
It loads fine when just accessing it normally, but once I try to access it via a nginx as a reverse proxy (which would be preferred greatly because of easy HTTPS and a subdomain) it does this. Is there anything I can try to fix this? |
It might be worth trying out the |
Following on #1428, I tried v3.0.1 and I'm having the same issue. For some reason, code-server will add parent dir to path which I suspect to be the issue. For instance if I access
|
Ohhh, I think I see what's going on. code-server makes all requests
against the base, so if you need the requests to go against some other
path then you'll need to rewrite the URL.
For nginx I think adding a trailing slash on `proxy_pass` should do it.
For example: `proxy_pass http://localhost:8080/;`.
|
@code-asher, yup! I can confirm this works. And, I thought I have tested all the possible combinations reverse proxy settings in nginx. Thanks a lot! |
🎉 |
See #1642 |
Hello, I have installed code-server. It worked previously, but it has stopped working.

This is what I see in Firefox:
This is my nginx reverse proxy setup:
This is what I use to start code-server:
Is this a bug? How can I fix this? it used to work
The text was updated successfully, but these errors were encountered: