您的位置 首页 centos

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、再次访问网站,能够成功登录

dbf0bc6e8f2e7b21ef76d5263227a22.png

相关视频教程推荐:linux视频教程

文章来源:智云一二三科技

文章标题:centos安装apache服务器无法访问

文章地址:https://www.zhihuclub.com/12307.shtml

关于作者: 智云科技

热门文章

网站地图