apache

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
apache [2016/09/09 15:24] jzapache [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 with htaccess
 +<code apache>
 +# permanent
 +Redirect 301 /google http://www.google.com/
 +# temporary
 +Redirect 302 /google http://www.google.com/
 +# redirent home
 +RewriteEngine On
 +RedirectMatch 301 ~.+ http://example.com/$0
 +</code>
 +
 +User dir redirect
 +<code apache>
 +<IfModule mod_userdir.c>
 +    UserDir http://example.com~*/
 +</IfModule>
 +</code>
 +
  
 ===== SSLEngine ===== ===== SSLEngine =====
行 32: 行 61:
 </code> </code>
  
-==== Redirect to ssl if not a old browser ====+===== Redirect to ssl if not a old browser =====
 <code apache> <code apache>
 # http://serverfault.com/questions/389806/redirect-to-ssl-only-if-browser-supports-sni # http://serverfault.com/questions/389806/redirect-to-ssl-only-if-browser-supports-sni
行 40: 行 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/
  • apache.1473405846.txt.gz
  • 上一次變更: 2016/09/09 15:24
  • jz