504 Bad Gateway Error

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: chuo.fm, library.chuo.fm

I ran this command:

It produced this output:

My web server is (include version): nginx/1.16.0

The operating system my web server runs on is (include version): Ubuntu

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):yes

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

root@charon:/# certbot --version

certbot 0.31.0

Hi @webmasterchuo

that's an error in your application / configuration. So please fix your application.

And you have created a new certificate:

Issuer not before not after Domain names LE-Duplicate next LE
Let's Encrypt Authority X3 2019-09-02 2019-12-01 biblio.chuo.fm, chuo.fm, library.chuo.fm, www.chuo.fm - 4 entries duplicate nr. 1
Let's Encrypt Authority X3 2019-07-16 2019-10-14 biblio.chuo.fm, chuo.fm, library.chuo.fm, new.chuo.fm, www.chuo.fm - 5 entries

But you don't use it, you use your old certificate. Perhaps restart your frontend, your http works.

Domainname Http-Status redirect Sec. G
• http://chuo.fm/
167.114.113.15 301 https://chuo.fm/ 0.210 A
• http://www.chuo.fm/
167.114.113.15 301 https://www.chuo.fm/ 0.247 A
• https://chuo.fm/
167.114.113.15 -14 10.027 T
Timeout - The operation has timed out
• https://www.chuo.fm/
167.114.113.15 -14 10.027 T
Timeout - The operation has timed out
• http://chuo.fm/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
167.114.113.15 301 https://chuo.fm/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 0.214 A
Visible Content: 301 Moved Permanently nginx/1.16.0
• http://www.chuo.fm/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
167.114.113.15 301 https://www.chuo.fm/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 0.214 A
Visible Content: 301 Moved Permanently nginx/1.16.0
• https://chuo.fm/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 404 3.543 A
Not Found
Visible Content: 404 Not Found nginx/1.16.0
• https://www.chuo.fm/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 404 3.537 A
Not Found
Visible Content: 404 Not Found nginx/1.16.0

Same with the redirect http -> https of /.well-known/acme-challenge, so the certificate creation has worked.

Thanks for your reply.
I already restarted the server using command “service nginx reload”
one of my websites “chuo.fm” works now , it started when i rebooted the VPS.
The other “library.chuo.fm” still shows the same error. (504 Bad Gateway)
What do you suggest to fix that ? and how can i switch my certificates ?

You have changed your certificate:

Issuer not before not after Domain names LE-Duplicate next LE
Let's Encrypt Authority X3 2019-09-02 2019-12-01 biblio.chuo.fm, chuo.fm, library.chuo.fm, www.chuo.fm - 4 entries duplicate nr. 1
Let's Encrypt Authority X3 2019-07-16 2019-10-14 biblio.chuo.fm, chuo.fm, library.chuo.fm, new.chuo.fm, www.chuo.fm - 5 entries

Old: 5 domain names. New: 4 domain names. So you have created a new certificate manual, so you have to install it manual.

See your older topics -> certbot certificates to see the file names, then change the two or three lines in your port 443 vHost, then restart your webserver.

PS: Your site is terrible slow.

Test with my browser - chuo.fm answers.

Test online - https has timeouts.

Domainname Http-Status redirect Sec. G
• http://chuo.fm/
167.114.113.15 301 https://chuo.fm/ 0.213 A
• http://www.chuo.fm/
167.114.113.15 301 https://www.chuo.fm/ 0.216 A
• https://chuo.fm/
167.114.113.15 -14 10.026 T
Timeout - The operation has timed out
• https://www.chuo.fm/
167.114.113.15 -14 10.016 T
Timeout - The operation has timed out

But rechecked with my browser and counting - the site needs more then 15 seconds to answer. The online tool uses a timeout of 10 seconds.

No user will wait 15 seconds to open your site.

2 Likes

I tried changing the certificates manually as you suggested.
I did the following:
root#: certbot
root@charon:~# certbot

Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate and install certificates?


1: Apache Web Server plugin (apache)

2: Nginx Web Server plugin (nginx)

i selected number 2

Which names would you like to activate HTTPS for?


1: chuo.fm

2: biblio.chuo.fm

3: library.chuo.fm

4: new.chuo.fm

5: www.chuo.fm

i selected only till number 4 since the old one had only 4 entries. It still does not work.

Also when i tried opening the website on other computer and its displaying me a NOT SAFE TO PROCEED ERROR

That's

not manually. You have to edit your config files manual.

Could you tell me which file in particular i have to change and what changes i have to make in it.

Would it help if i completely delete the old certificate with 5 domains ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.