Error creating ssl certificate

My domain is:
I ran this command:
sudo certbot --apache
then selected domain that need ssl certificate
It produced this output:
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
Enabled Apache rewrite module
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from []: “\n\n404 Not Found\n\n

Not Found



  • The following errors were reported by the server:

    Type: unauthorized
    Detail: Invalid response from
    []: “\n\n404 Not

    Not Found


    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.
    My web server is (include version):
    apache 2.4.29
    The operating system my web server runs on is (include version):
    Ubuntu 18.04 (LTS) x64
    My hosting provider, if applicable, is:
    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.31.0

Additional Notes:
let’s debug states that no issues were found so i honestly don’t know

Visiting shows the default Apache Ubuntu welcome page.

Is this a brand new server without any website uploaded yet?

If not, there might be a problem with the virtual host setup, which could be confusing Certbot’s Apache plugin. What does this show:

apachectl -t -D DUMP_VHOSTS
1 Like

the command Returns:

VirtualHost configuration:
*:80 is a NameVirtualHost
default server (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost (/etc/apache2/sites-enabled/

and yes this is a brand new server to setup my teams owncloud server

Ah, yes, this would probably cause the problem you're observing.

I'd suggest trying the following:

  1. Run this to disable the "default" website:

    a2dissite 000-default
  2. Modify /etc/apache2/sites-enabled/ to lowercase your server name. From ServerName to ServerName

and try again:

certbot --apache -d -d

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