-
Notifications
You must be signed in to change notification settings - Fork 6.3k
NGINX 502 Bad-Gateway 1.12.2 #3584
-
Hi,
code-server was working perfectly fine until a few weeks ago it suddenly stopped working.
Here is my nginx config:
events {
}
http {
server {
listen 8081 ssl;
listen [::]:8081 ssl;
ssl_certificate /var/cpanel/ssl/apache_tls/liemcomputing.ca/combined;
ssl_certificate_key /var/cpanel/ssl/apache_tls/liemcomputing.ca/combined;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
server_name liemcomputing.ca;
location / {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
}
}
}
Whenever I try to access it I see this:
I have also received this error:
2021年06月02日 22:48:38 [error] 11113#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client:[insert ip here] , server: liemcomputing.ca, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "liemcomputing.ca:8081"
I am using Centos Version 7.
Any help would be appreciated
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions
After reinstalling code-server everything is up and running now.
Replies: 3 comments 2 replies
-
until a few weeks ago it suddenly stopped working
What's changed between now and then?
I am using Centos Version 7
For hosting your code-server instance or accessing?
Hmm..I am less familiar with nginx but @code-asher or @bpmct might have insight
Beta Was this translation helpful? Give feedback.
All reactions
-
What's changed between now and then?
Renewed the SSL certificate and it stopped working about a week after.
For hosting your code-server instance or accessing?
Liemcomputing the main website and code-server are hosted on the same Centos server.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
The configuration looks good to me. Can you confirm that code-server is running and is on 8080? (Maybe try curl localhost:8080
.)
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi Asher,
We ended up reinstalling code-server and everything is running now.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
-
After reinstalling code-server everything is up and running now.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2