搭建LAMP环境过程中,安装Apache时报错:正在启动 httpd:httpd:Could not reliably determine the server’s fully qualif domain name,using ::1 for ServerName
解决办法:
编辑服务器配置文件
vi /etc/httpd/conf/httpd.conf
找到文件中的ServerName www.example.com:80"改为"ServerName www.localhost.com:80"
可使用“/”来查找(/ServerName www.example.com:80)
并去掉前面的#取消注释
设置服务器开机启动
chkconfig httpd on
重启Apache
/etc/init.d/httpd restart