linux httpd啓動沒法訪問問題

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下,如圖:
whereis.png
2.成功啓動後沒法訪問,主要是由於Linux的防火牆攔截,用命令service iptables status查看防火牆狀態,若是是開着就關閉:service iptables stop。
以下圖:
service.iptables.pnglinux

解決這兩個問題後可正常訪問。centos

相關文章
相關標籤/搜索