天天看點

Apache伺服器幾點簡單配置

1.  禁止目錄浏覽設定:

 打開conf目錄下的httpd.conf檔案,然後搜尋“options indexes followsymlinks”

去掉 indexes  也就是變為 options followsymlinks 即可。

2  . 全局預設頁面設定

 <ifmodule dir_module>

directoryindex index.shtml index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml default.php

</ifmodule>

3. ssi 支援設定:

1. 打開conf目錄下的httpd.conf檔案,搜尋“addtype text/html .shtml”,找到:

  # addtype text/html .shtml

  # addoutputfilter includes .shtml

  把這兩行前面的#去掉 。

2. 然後搜尋“options indexes followsymlinks”

  在搜尋到的那一行後面添加“ includes”

  即将該行改變為 options indexes followsymlinks includes

重新啟動即可。