这是我目前的/ frontend/web的htaccess配置
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME} [R,L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
Run Code Online (Sandbox Code Playgroud)
我想插入这个:
RewriteCond %{REQUEST_URI} !^.well-known/acme-challenge/$
Run Code Online (Sandbox Code Playgroud)
要么
RewriteCond %{REQUEST_URI} ! /\.well-known|^\.well-known
Run Code Online (Sandbox Code Playgroud)
以上
RewriteRule ^.*$ https://%{SERVER_NAME} [R,L]
Run Code Online (Sandbox Code Playgroud)
创建letsecnrypt证书,但这些都不起作用.
Letsencrypt命令创建证书(debug coz Centos6):
./letsencrypt-auto --debug certonly --webroot -w /var/www/html/example.com/frontend/web/ --email example@gmail.com --domains example.com
Run Code Online (Sandbox Code Playgroud)
letsencrypt错误:
The following errors were reported by the server:
Domain: example.com
Type: unauthorized
Detail: Invalid …Run Code Online (Sandbox Code Playgroud)