首頁  >  文章  >  運維  >  centos安裝apache伺服器無法存取

centos安裝apache伺服器無法存取

王林
王林原創
2020-03-16 19:45:563035瀏覽

centos安裝apache伺服器無法存取

問題:

Centos7安裝Apache Http伺服器無法存取

解決方法:

1、安裝Apache元件

[root@mycentos shell]# yum install httpd

2、安裝成功後,偵測有無httpd進程

(推薦教學:centos使用教學

[root@mycentos shell]# ps -e |grep httpd

3、如沒有,啟用該服務

[root@mycentos shell]# systemctl restart httpd.service

4、使用瀏覽器存取本機IP位址,顯示連結失敗。

應該是防火牆相關設定問題導致。

5、關閉並停用防火牆

[root@mycentos shell]# systemctl stop firewalld.service #停止防火墙服务
[root@mycentos Desktop]# systemctl disable firewalld.service #禁用防火墙开机启动服务
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

6、再次造訪網站,能夠成功登入

centos安裝apache伺服器無法存取

##相關影片教學推薦:

linux影片教學

以上是centos安裝apache伺服器無法存取的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn