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/*