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

NGINX 502 Bad-Gateway 1.12.2 #3584

Answered by Shahi-Paneer
Shahi-Paneer asked this question in Q&A
Discussion options

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:

Capture

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.

You must be logged in to vote

After reinstalling code-server everything is up and running now.

Replies: 3 comments 2 replies

Comment options

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

You must be logged in to vote
1 reply
Comment options

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.

Comment options

The configuration looks good to me. Can you confirm that code-server is running and is on 8080? (Maybe try curl localhost:8080.)

You must be logged in to vote
1 reply
Comment options

Hi Asher,

We ended up reinstalling code-server and everything is running now.

Comment options

After reinstalling code-server everything is up and running now.

You must be logged in to vote
0 replies
Answer selected by Shahi-Paneer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #3581 on June 09, 2021 16:59.

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