Challenge failed for domain mail.oltega.com

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: mail.oltega.com

I ran this command:
sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email contacts@oltega.com -d mail.oltega.com

It produced this output:
r oot@mail:~# sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email contacts@oltega.com -d mail.oltega.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mail.oltega.com
Waiting for verification…
Challenge failed for domain mail.oltega.com
http-01 challenge for mail.oltega.com
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: mail.oltega.com
   Type:   unauthorized
   Detail: Invalid response from
   http://mail.oltega.com/.well-known/acme-challenge/NqnyNZoEs8uUzbtPoBM99p3x70OPbGmvNcIELzemu5E
   [188.227.84.12]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
   2.0//EN\">\n<html><head>\n<title>404 Not
   Found</title>\n</head><body>\n<h1>Not Found</h1>\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.
root@mail:~# ^C
root@mail:~#

My web server is (include version):
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2020-04-13T17:19:17

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

My hosting provider, if applicable, is:
Serverspace.io

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. I use SSH

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

1 Like

Let’s start by reviewing the apache config with:
apachectl -S

And how/when did you install certbot?
Was the Ubuntu upgraded from 18.04 or fresh 20.04 install?

1 Like

Thanks a lot. I’m following this tutorial and everything earlier before trying to install Letsencrypt works fine. The Ubuntu 20.04 if running not upgraded from 18.

1 Like

That guide should have correctly provided the latest certbot

Let’s have a look at the apache config with:
apachectl -S

1 Like

Thanks. This is the apachectl -S
VirtualHost configuration:
18.27.84.12:80 is a NameVirtualHost
default server oltega.com (/etc/apache2/sites-enabled/oltega.com.conf:1)
port 80 namevhost oltega.com (/etc/apache2/sites-enabled/oltega.com.conf:1)
alias www.oltega.com
port 80 namevhost portal.oltega.com (/etc/apache2/sites-enabled/portal.oltega.com.conf:1)
alias www.portal.oltega.com
*:80 mail.oltega.com (/etc/apache2/sites-enabled/mail.oltega.com.conf:1)
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex rewrite-map: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=“www-data” id=33
Group: name=“www-data” id=33
root@mail:~#

1 Like

Hi @ken4ward

there you see a difference. The other two are `port 80 namevhost’, mail not.

Compare the files, change that, restart Apache, again apachectl -S.

3 Likes

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