1. 安装Apache组件

[[email protected] shell]# yum install httpd

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

[[email protected] shell]# ps -e |grep httpd

3. 如没有,启用该服务

[[email protected] shell]# systemctl restart httpd.service

4. 使用浏览器访问本机IP地址,如果显示链接失败如下:

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

应该是防火墙相关设置问题导致.
5.关闭并禁用防火墙
[[email protected] shell]# systemctl stop firewalld.service #停止防火墙服务
[[email protected] 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.再次访问网站,能够成功登录
Centos7安装Apache Http服务器无法访问如何解决


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

[[email protected] Desktop]# yum install iptables-services

[[email protected] Desktop]# systemctl enable iptables



转:http://blog.csdn.net/u010447234/article/details/63253448

相关文章:

  • 2021-12-28
  • 2021-05-25
  • 2021-05-03
  • 2021-07-10
  • 2021-09-18
  • 2021-05-31
  • 2021-11-23
  • 2021-10-07
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2021-12-12
  • 2022-12-23
  • 2021-07-21
相关资源
相似解决方案