<1>啟用apache2相關模組
即是將/etc/apache2/mods-available下的檔做softlink到/etc /apache2/mdos-enabaled下,有指令可達成 (1) a2enmod 模組 (2) a2dismod 模組,sites-available相同用法 (1) a2ensite 模組 (2) a2dissite 模組
<2>/etc/apache2/sites-available內的default可改 DocumentRoot /var/www
<3>apache2 模組設定檔在/etc/apache2/mods-enabled以下
(1) dir.conf為設定讀取網頁檔案的預設順序
例: <IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php index.cgi index.pl index.xhtml
</IfModule>
(2) userdir.conf為設定使用者家目錄,並配合chmod -R 755 家目錄
例:<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
</IfModule>
沒有留言:
張貼留言