I followed this tutorial and everything worked fine until Step 4 : Obtaining an SSL Certificate
PS : When I go to :
http://captiveportal.secureinside.be:81/ and http://www.captiveportal.secureinside.be:81/
Both work.
My ServerName : www.captiveportal.secureinside.be:81
My ServerAlias : captiveportal.secureinside.be:81
My domain is: captiveportal.secureinside.be
I ran this command: sudo certbot --apache
It produced this output:
Enabled Apache rewrite module
Challenge failed for domain www.captiveportal.secureinside.be
http-01 challenge for www.captiveportal.secureinside.be
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
The following errors were reported by the server:
Domain: www.captiveportal.secureinside.be
Type: unauthorized
Detail: Invalid response from
https://www.captiveportal.secureinside.be/.well-known/acme-challenge/T79raHDBfLJgw6s-yHvr57FTvayU1sgtS55tjyTlmag
[109.88.89.61]: "\r\n404 Not Found\r\n<body bgcolor="white">\r\n
404 Not Found
\r\n"
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):
The operating system my web server runs on is (include version): ubuntu 20.04
My hosting provider, if applicable, is: OVH
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):
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): 0.40.0