Overview for the impatient
Download | $ lynx http://httpd.apache.org/download.cgi |
Extract | $ gzip -d httpd-NN.tar.gz |
Configure | $ ./configure --prefix=PREFIX(PREFIX指安裝目錄) |
Compile | $ make |
Install | $ make install |
Customize | $ vi PREFIX/conf/httpd.conf |
Test | $ PREFIX/bin/apachectl -k start |
安裝好了後,出現問題如下:
[root at mobile apache]# dot /bin/apachectl start
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
結果
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
1、你沒有爲該目錄或者該文件設置guest組權限;
2、你沒有將該文件名設置爲默認頁面,尤其是在僅用域名訪問的情況下。
解決辦法:
chmod 701 /home/www (apache安裝目錄,同上面的PREFIX)
chmod 701 /home/www/*