差異處
這裏顯示兩個版本的差異處。
兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
tech:apache [2018/10/25 15:21] – [設定多個不同網域(Domain Name)網站設定] Jonathan Tsai | tech:apache [2021/12/04 11:35] (目前版本) – jonathan | ||
---|---|---|---|
行 1: | 行 1: | ||
====== Apache WebServer 設定技巧 ====== | ====== Apache WebServer 設定技巧 ====== | ||
+ | ===== 設定啟用 HSTS ===== | ||
+ | * [[https:// | ||
+ | * 將 httpd.conf 內的 headers_module 啟用< | ||
+ | : | ||
+ | LoadModule headers_module modules/ | ||
+ | :</ | ||
+ | * VirtualHost 內增加 header 設定< | ||
+ | : | ||
+ | < | ||
+ | Header always set Strict-Transport-Security " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Header always set Strict-Transport-Security " | ||
+ | </ | ||
+ | : | ||
+ | </ | ||
+ | |||
+ | **如果是 Debian 環境** | ||
+ | * < | ||
+ | * 編輯 virtual host exp. < | ||
+ | : | ||
+ | < | ||
+ | UseCanonicalName Off | ||
+ | ServerAdmin | ||
+ | DocumentRoot / | ||
+ | Header always set Strict-Transport-Security " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | SSLEngine on | ||
+ | ServerAdmin | ||
+ | DocumentRoot / | ||
+ | Header always set Strict-Transport-Security " | ||
+ | </ | ||
+ | : | ||
+ | </ | ||
+ | * 重新啟動 apache < | ||
+ | |||
+ | |||
===== 改用 MPM worker 模組提升效能 ===== | ===== 改用 MPM worker 模組提升效能 ===== | ||
* https:// | * https:// | ||
行 137: | 行 177: | ||
* http:// | * http:// | ||
* http:// | * http:// | ||
+ | * https:// | ||
+ | * https:// | ||
{{tag> | {{tag> |