Drupal + Godaddy Cpanel + Letsencrypt 筆記

01.修改 htaccess file:




RewriteRule "(^|/)\.(?!well-known)" - [F]


02.https://www.sslforfree.com/ Step by Step


03.Godaddy CPANEL 安裝並管理網站的 SSL


https://www.sslforfree.com/

https://support.cloudways.com/configure-drupal-lets-encrypt/


04.設定 drupal http to https redirect
修改.htaccess 注意!需寫在clean url前面??


# Redirect to HTTPS
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# 沒www 跳到有 www
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ https://www.mysite.com/$1 [L,R=301]

輸入http自動跑到https似乎只需改htacess,不用安裝securepages或Enabling HTTP Secure (HTTPS)模組吧??

Letsencrypt 憑證只有3個月,接近3個月就要重跑

CPANEL安裝憑證的過程比我預料的簡單許多 :)

可以用cron排期更新唷!
https://community.letsencrypt.org/t/how-to-automatically-renew-certificates/4393

留言

熱門文章