Could not reliably determine the server's fully qualified domain name
解决办法:vi /etc/httpd/conf/httpd.conf 加入一句 ServerName localhost:80
2.当启动HTTPD报下面错误时的解决办法:
(98)Address already in use: make_sock: could not bind to address [::]:443
解决办法:说明有443端口已被占用,杀掉该进程,再重新启动HTTPD服务,
1.netstat -apn查看端口被哪个PID占了
2.kill -9 PID 杀掉该进程
3.service httpd restart 重启服务
3.修改主页到指定文件的方法
编辑如下文件:vi /etc/httpd/conf/httpd.conf
修改主页索引文件:DirectoryIndex index.html index.html.var
修改主页到指定文件下:DocumentRoot "/var/www/html"
4.无法打开默认主页的问题
1)HTTPD默认主页为/VAR/WWW下,可以把主页文件存到WWW下的目录,然后把/VAR目录的拥有者改为apache,具体方法如下:
[root@localhost ny]# cp -r cp -r www/ /var
[root@localhost /]# chown -R apache.apache var/
2)因为开着防火墙,所以要把它关掉,方法如下:
/etc/init.d/iptables stop 关掉它
chkconfig iptables --level 345 off 无法开机自启