-
Notifications
You must be signed in to change notification settings - Fork 6.3k
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment