Skip to content

Can I make code server access on a sub path? #6987

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

You must be logged in to vote

I tried it out and got the same error. It looks like NGINX is sending requests with double slashes like //login for some reason. I was able to get it working like this:

location = /code {
  return 302 /code/$is_args$args;
}
location /code/ {
  proxy_pass http://localhost:8080/;
  proxy_set_header Host $http_host;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection upgrade;
  proxy_set_header Accept-Encoding gzip;
}

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@imran0
Comment options

@code-asher
Comment options

@imran0
Comment options

@code-asher
Comment options

Answer selected by imran0
@imran0
Comment options

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