差異處
這裏顯示兩個版本的差異處。
兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
tech:apache [2021/12/02 12:31] – [設定啟用 HSTS] jonathan | tech:apache [2021/12/04 11:35] (目前版本) – jonathan | ||
---|---|---|---|
行 1: | 行 1: | ||
====== Apache WebServer 設定技巧 ====== | ====== Apache WebServer 設定技巧 ====== | ||
===== 設定啟用 HSTS ===== | ===== 設定啟用 HSTS ===== | ||
+ | * [[https:// | ||
* 將 httpd.conf 內的 headers_module 啟用< | * 將 httpd.conf 內的 headers_module 啟用< | ||
: | : | ||
行 7: | 行 8: | ||
* VirtualHost 內增加 header 設定< | * VirtualHost 內增加 header 設定< | ||
: | : | ||
+ | < | ||
+ | Header always set Strict-Transport-Security " | ||
+ | </ | ||
+ | |||
< | < | ||
Header always set Strict-Transport-Security " | Header always set Strict-Transport-Security " | ||
行 17: | 行 22: | ||
* 編輯 virtual host exp. < | * 編輯 virtual host exp. < | ||
: | : | ||
+ | < | ||
+ | UseCanonicalName Off | ||
+ | ServerAdmin | ||
+ | DocumentRoot / | ||
+ | Header always set Strict-Transport-Security " | ||
+ | </ | ||
+ | |||
< | < | ||
SSLEngine on | SSLEngine on | ||
行 166: | 行 178: | ||
* http:// | * http:// | ||
* https:// | * https:// | ||
+ | * https:// | ||
{{tag> | {{tag> |