差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
apache [2017/02/19 18:44] jz |
apache [2017/02/28 00:32] (目前版本) jz |
||
---|---|---|---|
行 1: | 行 1: | ||
====== Apache ====== | ====== Apache ====== | ||
+ | |||
+ | ===== Hide server info ===== | ||
+ | <code apache> | ||
+ | Header unset Server | ||
+ | |||
+ | ServerSignature Off | ||
+ | ServerTokens Prod | ||
+ | </code> | ||
===== Redirect ===== | ===== Redirect ===== | ||
行 9: | 行 17: | ||
# temporary | # temporary | ||
Redirect 302 /google http://www.google.com/ | Redirect 302 /google http://www.google.com/ | ||
+ | # redirent home | ||
+ | RewriteEngine On | ||
+ | RedirectMatch 301 ~.+ http://example.com/$0 | ||
</code> | </code> | ||
行 14: | 行 25: | ||
<code apache> | <code apache> | ||
<IfModule mod_userdir.c> | <IfModule mod_userdir.c> | ||
- | UserDir http://galaxy.lens.csie.ncku.edu.tw/~*/ | + | UserDir http://example.com~*/ |
</IfModule> | </IfModule> | ||
</code> | </code> | ||
行 58: | 行 69: | ||
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | ||
</code> | </code> | ||
+ | |||
+ | ref: | ||
+ | |||
+ | http://unix.stackexchange.com/questions/124137/change-apache-httpd-server-http-header | ||
+ | |||
+ | https://donjajo.com/modify-apache-servertokens-custom-value-using-mod_security-module/ |