Using the webroot domain verification method

Thanks Leliana I have been doing the same kind of thing with Apache, in my case I want to be able to password protect an entire site using a .htaccess file and still have a Let’s Encrypt cert for it, I have been using /var/www/well-known for the Let’s Encrypt generated files. In the Apache config for the VirtualHost you simply need an Alias, for example:

Alias "/.well-known/acme-challenge" "/var/www/well-known/example.org/.well-known/acme-challenge"

Make sure the directory exists:

mkdir -p /var/www/well-known/example.org

And run the client with:

--webroot-path /var/www/well-known/example.org
2 Likes