linux(centos6.9)中成功安装httpd,成功访问前遇到两个问题:
1.启动时报:httpd: Could not reliably determine the server's fully qualified domain name
这是由于未配置serverName的缘由,找到httpd.conf进入编辑,修改ServerName localhost:80
,就不会报错了。
另外查看httpd安装路径,使用whereis httpd,通常是在/etc
或者/var
下,如图:
2.成功启动后没法访问,主要是由于Linux的防火墙拦截,用命令service iptables status查看防火墙状态,若是是开着就关闭:service iptables stop。
以下图:linux
解决这两个问题后可正常访问。centos