Hello,
I'm trying to get apache 2.4 not to rewrite urls with
.well-known/acme-challenge in them. I do not want these urls
redirected to https but all other urls to do so. Everytime I think
I've got this renewing a letsencrypt certificate fails.
If anyone sees a glaringly obvious error i'd appreciate knowing about it.
Thanks.
Dave.
httpd.conf fragment
# Access to .well-known for acme-challenge keys
<Directory "/usr/local/www/.well-known/">
Options None
AllowOverride None
Require all granted
Header add Content-Type text/plain
<LimitExcept GET POST HEAD>
Require all denied
</LimitExcept>
</Directory>
#
# Virtual host file
# share well-known for renewal via Let's Encrypt!
Alias "/.well-known/" "/usr/local/www/.well-known/"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %(REQUEST_URI) !/\.well\-known/acme\-challenge/?.*
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]