[BlueOnyx:21255] Re: problem creation of let's encrypt certificate when using .htaccess
PESJA A & A
info at pesja.nl
Tue Aug 15 13:52:07 -05 2017
Hi Michael,
Yep, that did the trick:
===
RewriteRule ^(?!\.well-known(?:$|/)).* https://%{SERVER_NAME}/$0 [R=301,L]
===
Many thank's!!
PESJA
Hi Pesja,
> ====
>
> RewriteEngine On
> RewriteCond %{SERVER_PORT} 80
> RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R,L]
>
> ===
Yeah, that won't do. Let's Encrypt does an online verification. It puts a file into a special folder in your web tree and then tries to access that file via all the domains that your cert should be valid for. If you have RewriteRules that prevent this, then the verification fails.
You need to insert this RewriteRule to allow LE access to the .well-known directory:
RewriteRule ^(?!\.well-known(?:$|/)).* https://%{SERVER_NAME}/$0 [R=301,L]
Examples:
https://stackoverflow.com/questions/38790421/letsencrypt-with-htaccess
--
With best regards
Michael Stauber
_______________________________________________
Blueonyx mailing list
Blueonyx at mail.blueonyx.it
http://mail.blueonyx.it/mailman/listinfo/blueonyx
More information about the Blueonyx
mailing list