啟動Apache serversudo /etc/init.d/apache2 start
停止Apache serversudo /etc/init.d/apache2 stop
重啟動Apache serversudo /etc/init.d/apache2 restart
使系統上所有使用者都擁有自己的個人網頁
cd /etc/apache2/mod-enabled/
ln -s ../mods-available/userdir.conf userdir.conf
ln -s ../mods-available/userdir.load userdir.load
當使用者瀏覽頁面失敗時,不顯示檔案結構的設定,而出現
Forbidden
You don't have permission to access / on this server.
-----------------------------------------------------------------------------
sudo vim /etc/apache2/sites-avaiable/default
將原指令
<Directory /var/www>Options Indexes FollowSymLinks MultiViews 改成
<Directory /var/www>Options -Indexes FollowSymLinks MultiViews
系統上的使用者則是
sudo vim /etc/apache2/mods-available/userdir.conf
將原指令
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
改成
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec</Directory>
留言列表