Error creating ssl certificate

My domain is:
omniacloud.org
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 omniacloud.org
Enabled Apache rewrite module
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. omniacloud.org (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://omniacloud.org/.well-known/acme-challenge/XJT4eLKwctUl1lgO1Ce8f_oeHPi85xQuXkTA1ENprzQ [167.71.127.180]: “\n\n404 Not Found\n\n

Not Found

\n<p”

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: omniacloud.org
    Type: unauthorized
    Detail: Invalid response from
    http://omniacloud.org/.well-known/acme-challenge/XJT4eLKwctUl1lgO1Ce8f_oeHPi85xQuXkTA1ENprzQ
    [167.71.127.180]: “\n\n404 Not
    Found\n\n

    Not Found

    \n<p”

    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:
    DigitalOcean
    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.31.0

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

Visiting http://omniacloud.org 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 omniacloud.org (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost omniacloud.org (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost Omniacloud.org (/etc/apache2/sites-enabled/omniacloud.org.conf:1)
alias www.omniacloud.org

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/omniacloud.org.conf to lowercase your server name. From ServerName Omniacloud.org to ServerName omniacloud.org

and try again:

certbot --apache -d omniacloud.org -d www.omniacloud.org
4 Likes

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