Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Chrome reports too many redirects #3597

Unanswered
necrogami asked this question in Q&A
Discussion options

So i'm working on setting up a code server on a raspberry pi.

It's running as a service from the default pi user.

Config was changed

bind-addr: 0.0.0.0:8080
auth: password
password: <removed>
cert: true

I have ssl setup in nginx and forwarding:

server {
 listen 443 ssl;
 server_name code.home;
 ssl_certificate /opt/certs/cert/code-server.crt;
 ssl_certificate_key /opt/certs/key/code-server.key;
 ssl_protocols TLSv1.2 TLSv1.3;
 ssl_ciphers HIGH:!aNULL:!MD5;
 
 location / {
 proxy_pass https://localhost:8080;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection "upgrade";
 proxy_set_header Accept-Encoding gzip;
 proxy_set_header Host $host;
 }
}
server {
 listen 80;
 server_name code.home;
 return 301 https://code.home$request_uri;
}

If in config.yaml i set cert to false i get 502 bad gateway (with nginx pointed at http)
with nginx updated to https on the proxy and cert set to true i get chrome telling me too many redirects.

Any idea why this is happenning?

You must be logged in to vote

Replies: 1 comment

Comment options

I think `cert: false` is definitely the right move since you already have TLS handled in NGINX. Can you confirm that code-server is starting up? The code-server logs might help here. I think a 502 often means the upstream isn't running.
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /