如下图,使用 yum install httpd 后,启动 httpd 服务,系统提示could not reliably determine the server's fully qualified domain name,网上有人说是端口被占用,但是netstat 输出结果显示httpd 服务运行在80 端口,查看httpd的配置文件
那么找到如下一行,并改写,使用本地的 localhost 作 servername
重启服务,OK
突然记起安装完httpd 后需要关闭SELinux(SELinux控制的网络访问机制太复杂了)
使用 setenforce 0 暂时关闭 SELinux 后 getenforce 显示SELinux 状态为 permissive
刷新浏览器,依旧无法访问,直接使用 service iptables stop 命令关闭iptables 后刷新浏览器 ,OK
转载于:https://blog.51cto.com/10237569/1689507