Centos7安装Apache Http服务器无法访问如何解决

您所在的位置:网站首页 apache官网不能访问 Centos7安装Apache Http服务器无法访问如何解决

Centos7安装Apache Http服务器无法访问如何解决

2023-11-11 11:59| 来源: 网络整理| 查看: 265

1. 安装Apache组件

[root@mycentos shell]# yum install httpd

2. 安装成功后,检测有无httpd进程

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

注意:如果你还是希望使用iptables来进行防火墙配置,记得一定要做下面设置:

[root@mycentos Desktop]# yum install iptables-services

[root@mycentos Desktop]# systemctl enable iptables



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3