Installing Apache Http Server on Linux

Overview for the impatient

Download $ lynx http://httpd.apache.org/download.cgi
Extract $ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NN
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/*
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章