Skip to content
\n

The docker container is launched with docker run --rm -p 3000:3000 -p 8000:80 coderwithnginx:latest, exposing both port 3000 and port 80. When accessing via http://127.0.0.1:3000, the extensions work. However when accessing via http://127.0.0.1:8000/coder/, only the editor and terminal work. It looks like the extensions are installed but not activated, and I am getting error messages in the dev console.

\n
\n

Screenshot for the working scenario

\n
\n\"截屏2024-09-20\n> Screenshot for the failed scenario \n\"截屏2024-09-20\n

What could be the possible causes?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Do the query parameters get included in the location match? Wonder if you need proxy_pass http://127.0.0.1:3000/$1$is_args$args;.

\n

Or this should also work, I think:

\n
location /coder/ {\n  proxy_pass http://127.0.0.1:3000/;\n}\n
","upvoteCount":1,"url":"https://github.com/coder/code-server/discussions/7006#discussioncomment-10731819"}}}

Extensions fail to load when using reverse proxy with subpath. #7006

Closed Answered by code-asher
davidliyutong asked this question in Q&A
Discussion options

You must be logged in to vote

Do the query parameters get included in the location match? Wonder if you need proxy_pass http://127.0.0.1:3000/$1$is_args$args;.

Or this should also work, I think:

location /coder/ {
  proxy_pass http://127.0.0.1:3000/;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davidliyutong
Comment options

Answer selected by davidliyutong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants