[SOLVED] My server time out since I installed Let's Encrypt Certificate

Hello everyone.

My server is running on Ubuntu and the web server is provided by Nginx. The web server provides access to an API I have developed.

Everything worked when I was not using SSL certificate.

I needed to secure the communication, so I installed the certificate using Certbot.
Everything went perfectly. But, when I tried to reach my server using Chrome or Firefox and all I got was a time-out.
I have read this post : Server connection timing out when after getting certificate

So I did the following:

curl -Ii api.gordios.app
HTTP/1.1 301 Moved Permanently
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 19 Sep 2024 12:44:51 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://api.gordios.app/

I checked my Nginx configuration, everything seemed OK:

sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

I checked my firewall:

sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
Nginx HTTP                 ALLOW       Anywhere
OpenSSH                    ALLOW       Anywhere
Nginx HTTP (v6)            ALLOW       Anywhere (v6)
OpenSSH (v6)               ALLOW       Anywhere (v6)

And finally, I checked the error.log, but it is empty.

I also checked my DNS configuration on OVH. I have the CAA field like this:

api.gordios.app. 0 CAA 0 issue "letsencrypt.org"

I am lost.

Any assistance would be appreciated.


Mandatory information

My domain is: api.gordios.com

My web server is (include version): Nginx 1.18.0

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

My hosting provider, if applicable, is: OVH

I can login to a root shell on my machine: yes (using sudo)

I'm using a control panel to manage my site : no

The version of my client (certbot) is 2.11.0

Hi @valentinbesse

It seems that something is interfering with HTTPS.

HTTP works:

curl -Ii api.gordios.app
HTTP/1.1 301 Moved Permanently
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 19 Sep 2024 12:55:41 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://api.gordios.app/

HTTPS fails to connect:

curl -Ii https://api.gordios.app
^C

openssl s_client -connect api.gordios.app:443
^C

Is there an IPS type device in line?
Please show:
nginx -T

2 Likes

Is this allowing HTTP (port 80), but blocking HTTPS (port 443)?

5 Likes

Great catch! @petercooperjr
That's only allowing SSH and HTTP.
[everything else is dropped]

3 Likes

Oooooh. It is just that. OK, I will open the port 443. Thank you :wink:

3 Likes

It works perfectly. Thank you so much to both of you.

The topic can be closed.

4 Likes

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