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

I ran this command:
sudo certbot -d --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):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching Connection refused


  • The following errors were reported by the server:

    Type: connection
    Detail: Fetching
    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):

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

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

Domainname Http-Status redirect Sec. G 301 0.207 A 200 1.364 N
Certificate error: RemoteCertificateChainErrors 301 0.206 A
Visible Content: Moved Permanently The document has moved here . Apache/2.4.18 (Ubuntu) Server at Port 80 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

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.