Trouble creating certificate for new domain name

Hi everyone,

I recently changed my dev server’s domain name, and now I’m having trouble getting SSL working.

Previously, the server was pointing to jacob-01.naf.org. SSL (set up with let’s encrypt) was working fine. Now, the site is still functioning, but the certificate isn’t.

My old certificate is still referenced in /etc/apache2/sites-available/000-default-le-ssl.conf, but if I try removing the reference from there or revoking the certificate I can’t start up apache again.

I’m really bad at resolving sys admin stuff, but I’ve had a few coworkers try to resolve the issue as well with no luck.

Thanks in advance! Please let me know if I should include any extra information.

My domain is:
bojack.naf.org

I ran this command:
sudo certbot -d bojack.naf.org --force-renewal

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for bojack.naf.org
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. bojack.naf.org (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://bojack.naf.org/.well-known/acme-challenge/QGhht4WcnLwEJ59Ghz8FdZLjmbR4KC8ip2xTlDMvrYc: Connection refused

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: bojack.naf.org
    Type: connection
    Detail: Fetching
    http://bojack.naf.org/.well-known/acme-challenge/QGhht4WcnLwEJ59Ghz8FdZLjmbR4KC8ip2xTlDMvrYc:
    Connection refused

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

My web server is (include version):
Apache/2.4.18 (Ubuntu)

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

My hosting provider, if applicable, is:
Digital Ocean

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):
No

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

Hi @jnlamf

looks like you have changed your configuration ( https://check-your-website.server-daten.de/?q=bojack.naf.org ):

Domainname Http-Status redirect Sec. G
http://bojack.naf.org/
159.203.115.98 301 https://bojack.naf.org/ 0.207 A
https://bojack.naf.org/
159.203.115.98 200 1.364 N
Certificate error: RemoteCertificateChainErrors
http://bojack.naf.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
159.203.115.98 301 https://bojack.naf.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 0.206 A
Visible Content: Moved Permanently The document has moved here . Apache/2.4.18 (Ubuntu) Server at bojack.naf.org Port 80
https://bojack.naf.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 404 1.164 N
Not Found
Certificate error: RemoteCertificateChainErrors
Visible Content:

There is no "Connection refused", instead a redirect http -> https and a correct http status 404 - Not Found.

So check your config to find your port 443 vHost, then your DocumentRoot. Then use that:

certbot run -a webroot -i apache -w yourDocumentRoot -d bojack.naf.org

Wow. Thank you, I don’t totally understand the solution, and my doc root never changed, but that command solved it! Appreciate the help.

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