I have two identical cPanel webservers on a load balancer, with the main domain of example.com pointed to the load balancer, and a third webserver that is not on the load balancer at authserver.example.com. (not really example.com, just using that as an example). I'd like to set up AutoSSL with Let's Encrypt on example.com, using authserver.example.com as the central validation server, and rsync the certificate to the load balanced servers but I'm unable to complete http validation to begin with.
On this thread on the Let's Encrypt forums, it's mentioned that two ways you can complete a challenge on a cluster is with DNS-01 verification, or with a 301 redirect, to redirect the http challenge to a central auth server.
I'd rather do DNS verification, but the plugin doesn't support this, so I'm trying the 301 redirect to the auth server (authserver.example.com, mentioned above). Here is the redirect I have in my .htaccess on both of the load balanced servers:
This works, when I try to go to example.com/.well-known/acme-challenge/test.html, I get redirected to authserver.example.com/.well-known/acme-challenge/test.html.
So, I'm attempting the AutoSSL set-up on the authserver, which is not on the load balancer. When I do this, it doesn't work, and I have this error in the logs:
The ip address it mentions that doesn't exist on the server is the ip of the load balancer, where example.com is pointed. When I look in the acme-challenge directory on the authserver, I don't see the file it's looking for, so either it's not creating it, or it's deleting it when the challenge fails.
Does anyone have any suggestions for how to fix this, or how to get the challenge to complete on a load-balanced environment with cPanel? Do I have to just use the command-line certbot to try to do a DNS-01 validation, and forget about the AutoSSL plugin? And, are there any problems / conflicts with using the manual certbot on a cPanel system? Thanks!
On this thread on the Let's Encrypt forums, it's mentioned that two ways you can complete a challenge on a cluster is with DNS-01 verification, or with a 301 redirect, to redirect the http challenge to a central auth server.
I'd rather do DNS verification, but the plugin doesn't support this, so I'm trying the 301 redirect to the auth server (authserver.example.com, mentioned above). Here is the redirect I have in my .htaccess on both of the load balanced servers:
Code:
RewriteRule ^.well-known/acme-challenge/?(.*)$ http://authserver.example.com/.well-known/acme-challenge/$1? [R=301,L]
So, I'm attempting the AutoSSL set-up on the authserver, which is not on the load balancer. When I do this, it doesn't work, and I have this error in the logs:
Code:
WARN The domain “example.com” failed domain control validation: The system queried for a temporary file at “<a href="http://authserver.example.com/.well-known/acme-challenge/[hash]">http://authserver.example.com/.well-known/acme-challenge/[hash]</a>”, which was redirected from “<a href="http://example.com/.well-known/acme-challenge/[hash]">http://example.com/.well-known/acme-challenge/[hash]</a>”. The web server responded with the following error: 404 (Not Found). A <abbr title="Domain Name System">DNS</abbr> or web server misconfiguration may exist. The domain “example.com” resolved to an IP address “[ip address]” that does not exist on this server.
Does anyone have any suggestions for how to fix this, or how to get the challenge to complete on a load-balanced environment with cPanel? Do I have to just use the command-line certbot to try to do a DNS-01 validation, and forget about the AutoSSL plugin? And, are there any problems / conflicts with using the manual certbot on a cPanel system? Thanks!
Last edited by a moderator: