My domain is: www.piboxproject.com
My operating system is (include version): CentOS 6.8
My web server is (include version): Apache 2.2.15
My hosting provider, if applicable, is: my personal colo. I have full Linux admin control of this host.
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 ran this command: sudo certbot-auto, sudo certbot-auto certonly --webroot
Without args to certbot-auto I get this:
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for www.piboxproject.com
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. www.piboxproject.com (tls-sni-01): urn:acme:error:connection :: The server could
not connect to the client to verify the domain :: Failed to connect to 66.35.39.9:443 for TLS-SNI-01 challenge
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: www.piboxproject.com
Type: connection
Detail: Failed to connect to 66.35.39.9:443 for TLS-SNI-01
challenge
With the --webroot arg I get this:
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. www.piboxproject.com (http-01): urn:acme:error:unauthorized :: The client lacks
sufficient authorization :: Invalid response from
http://www.piboxproject.com/.well-known/acme-challenge/UwffOaP-jo2Vs4NB-JceCq6UlspsD1KI3A6ZFveCuHA: "
Forbidden
<p"IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: www.piboxproject.com
403 Forbidden
Type: unauthorized
Detail: Invalid response from
http://www.piboxproject.com/.well-known/acme-challenge/UwffOaP-jo2Vs4NB-JceCq6UlspsD1KI3A6ZFveCuHA:
"Forbidden
<p"
I have a number of NameVirtualHosts setup on my server. I have an Apache config file in /etc/httpd/conf.d with this:
NameVirtualHost 66.35.39.9
I tried certbot but it failed as shown. I changed all my virtual host configs (one per conf.d file) to use :443 and changed the above to
NameVirtualHost 66.35.39.9:443
I tried again, but it failed the same way. I can telnet to port 443. With the :443 config I get an Apache default page, not my domain web site. Curl reports:
$ curl -I www.piboxproject.com:443
HTTP/1.1 301 Moved Permanently
Date: Thu, 30 Mar 2017 17:55:32 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Location: https://www.piboxproject.com/
Connection: close
Content-Type: text/html; charset=UTF-8
After failing to make any progress with the default certbot command I tried the --webroot option. I discovered it wanted access to something called .well-known/acme-challenge. I’ve never heard of that but maybe it’s an apache thing? Anyway, I created the directory and gave it permissions so the apache user could read/write that directory. I still get the 403 Forbidden response.
I’ve run out of ideas here. I’m guessing it’s something to do with the way I configured my virtual hosts. Right now I have returned to not using :443 on the virtualhost configs or in the NameVirtualHosts configuration just so the sites remain working.
Any pointers on what I can try next?