I run codeigniter sites. I run them https only. I use a vhosts file to configure them. I also restrict access to some of them via IP address limiting.
I have never been able to get certbot running without webroot. I got cerbot to run by making a dummy site that allows access (no framework) and using webroot. So I have valid certs. But I need to get auto-renew running.
The problems with webroot are:
- the code does http only so if I always force https, I get an error
- Frameworks mess with the URLS. I can open up /.well-known as a non-framework directory, but it still doesnât work for some reason.
What I really need is for certbot to work without webroot.
my domain is www.carespan.help
It is set as an A record to point to my IP (the site works)
My apache config is as follows:
ServerName www.carespan.help
DocumentRoot /home/httpd/sites/carespanhelp/doc-root/
<Directory â/home/httpd/sites/carespanhelp/doc-rootâ>
Require all granted
AllowOverride All
Options -Indexes
ServerName www.carespan.help
DocumentRoot /home/httpd/sites/carespanhelp/doc-root/
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/www.carespan.help/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.carespan.help/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.carespan.help/chain.pem
<Directory â/home/httpd/sites/carespanhelp/doc-rootâ>
Require all granted
AllowOverride All
Options -Indexes
Does ârenewâ always use webroot? I get this error when running certbot renew --dry-run
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: www.carespan.help
403 Forbidden
Type: unauthorized
Detail: Invalid response from
http://www.carespan.help/.well-known/acme-challenge/gTCmaHYjMa-pkfOtwAxKH1MriGYHWOILTVmuXuUVQ1c:
"Forbidden
<p"To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.