I'm trying to setup a two server system, where one is doing webhosting and the another is delivering content (CDN) for the webhost server.
I currently own two servers and they both have Let's Encrypt SSL.
webhost https://example.com
example.com 123.123.123.123
CDN https://foo.com
foo.com 111.111.111.111
I have setuped a subdomain to my webhost server:
cdn.example.com
, which is pointing to the CDN server foo.com 111.111.111.111
.
The problem is that the cdn.example.com
does not have Let's Encrypt SSL.
How can I get the Let's Encrypt SSL for the cdn.example.com
which is pointing to the foo.com 111.111.111.111
?
When I run:
certbot --apache --cert-name example.com -d cdn.example.com
It gives an error:
Failed authorization procedure. cdn.example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://cdn.example.com/.well-known/acme-challenge/PaKenmvAqHoOdOBUhThxxxxx: "<!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"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: cdn.example.com Type: unauthorized Detail: Invalid response from http://cdn.example.com/.well-known/acme-challenge/PaKenmvAqHoOdOBUhThxxxxx: "<!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.
Running default Debian and Apache2 installation.
I guess I have to manually set the acme-challenge files in my CDN server? What commands should I run?