1、源代码编译安装
2、配置文件httpd.conf放到 /usr/local/webapache/apache2/conf/httpd.conf
3、更改目录DocumentRoot /home/www
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
这里改成Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
问题解决Options Indexes FollowSymLinks
AllowOverride None
</Directory>
4、更改端口
Listen 192.168.1.6:8001
ServerName localhost:8001
5、去掉默认注释,解决这个运行报错。/etc/init/httpd start
#ServerName localhost:8001
改为:
ServerName localhost:8001
httpd: Could not reliably determine the server's fully qualified domain name
6、添加服务启动
cp /usr/local/webapache/apache2/bin/apachectl /usr/sbin/httpd
cp /usr/local/webapache/apache2/bin/apachectl /etc/init.d/httpd
cp /usr/local/webapache/apache2/bin/apachectl /etc/init.d/httpd