[Errno 13] Permission denied | Please add a virtual host for port 80

#1

Hello everyone,

My domain is: lucianograpsa.com

I ran this command: sudo certbot-auto --apache

It produced this output:

output
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for lucianograpsa.com
Cleaning up challenges
Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.

I ran this command: sudo certbot-auto -a webroot -i apache

It produced this output:

output
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for lucianograpsa.com
Input the webroot for lucianograpsa.com: (Enter 'c' to cancel): /var/www/lucianograpsa.com
Cleaning up challenges
Encountered exception during recovery:
Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/error_handler.py", line 108, in_call_registered self.funcs[-1]()
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 220, in_cleanup_challenges self.auth.cleanup(achalls)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/plugins/webroot.py", line 224, in cleanup os.remove(validation_path)
OSError: [Errno 2] No such file or directory: '/var/www/lucianograpsa.com/.well-known/acme-challenge/lVr7eO4agPfveOnW07iWZ-0rRDF4UJxTFYRBrG2R5Fc'
Couldn't create root for lucianograpsa.com http-01 challenge responses: [Errno 13] Permission denied: '/var/www/lucianograpsa.com/.well-known'

My web server Apache 2.4.10

The operating system my web server runs on is: Debian 8

I can login to a root shell on my machine.

I’m using ISPConfig 3.1.6 to manage my site

The version of my client is certbot 0.32.0

Thank you for your time,
Kind Regards!

#2

Hi @kappy

looks like ISPConfig

has an integrated Letsencrypt solution.

So you should use that - not an own Certbot.

There ( https://check-your-website.server-daten.de/?q=lucianograpsa.com ) you see the problem:

Domainname Http-Status redirect Sec. G
http://lucianograpsa.com/
93.51.201.117 200 0.137 H
http://www.lucianograpsa.com/
93.51.201.117 200 0.140 H
https://lucianograpsa.com/
93.51.201.117 301 https://leghorngroup.it/ 3.480 N
Certificate error: RemoteCertificateNameMismatch
https://www.lucianograpsa.com/
93.51.201.117 301 https://leghorngroup.it/ 3.663 N
Certificate error: RemoteCertificateNameMismatch
https://leghorngroup.it/ 200 4.336 I
http://lucianograpsa.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
93.51.201.117 404 0.140 A
Not Found
Visible Content: ERROR 404 - Not Found! The following error occurred: The requested URL was not found on this server. Please check the URL or contact the webmaster. Powered by ISPConfig
http://www.lucianograpsa.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
93.51.201.117 404 0.134 A
Not Found
Visible Content: Not Found The requested URL /.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de was not found on this server. Apache/2.4.10 (Debian) Server at www.lucianograpsa.com Port 8085

Looks like the non-www version is managed by ISPConfig, the www-version has an internal redirect to another port (port 8085).

closed #3

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