Replies: 4 comments
-
@wrexroad I think you are missing a trailing slash in proxy_pass: |
Beta Was this translation helpful? Give feedback.
-
Thanks for the idea, but neither of those worked. I think the problem is that some of the openvscode-server files are linked with absolute paths, so those bypass the /vscode/ subdirectory in the URL and try to load from the root of the web server. For example, here is the NGINX access log showing two of the workbench files that are requested. One uses a relative path, the other uses an absolute path:
The absolute path is trying to get the file I don't think there is any way to have the absolute paths corrected with NGINX, is there? I found in manifest.json there is a value for "start_url" but changing that doesn't seem to have any effect. Maybe that is for when the app guest built? |
Beta Was this translation helpful? Give feedback.
-
Ok after realizing that some of the files were loading, and some weren't I did some digging. There is are a couple of functions that build URLs based on the current URL. The problem is the hostname is used, but the pathname is ignored. I patched up the files and it's working well now. I will probably open an issue when I have time. |
Beta Was this translation helpful? Give feedback.
-
I know this is an old post, but for anyone who finds this post it may help. I have been using NGINX to put multiple containers of vscode for each of my projects.
docker network create my_network
# You don't need to expose the port
docker run -itd --name project1 --network my_network -v "..." gitpod/openvscode-server
docker run -itd --name project2 --network my_network -v "..." gitpod/openvscode-server
# DO expose NGINX ports
docker run -itd --name nginx -p 80:80 --network my_network -v "..." nginx
I worked around the custom path issue by keeping everything on the root path, but only route my requests to vscode if a specific cookie is set. I also added a You have to add a Unfortunately I had to use an
|
Beta Was this translation helpful? Give feedback.
-
I have seen a few posts about getting an NGINX reverse proxy working, but I am still stuck. If I setup the proxy with the location '/' everything works fine, but if I try to use a path other than '/' I get an error "Not Found" coming from openvscode-server.
This is the configuration I am using:
As far as I can tell, the initial request with the token goes through, but then when it tries to redirect so the URL bar doesn't have the token displayed, something gets messed up. Does anyone have a configuration like this working?
Beta Was this translation helpful? Give feedback.
All reactions