转载https://blog.csdn.net/u010447234/article/details/63253448
试过很多方法,,,最后亲测该方法有效。
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.再次访问网站,能够成功登录

本文介绍如何在CentOS系统上安装Apache Web服务器,并解决因防火墙设置导致无法通过浏览器正常访问的问题。文章提供了详细的步骤,包括安装Apache、检查进程、重启服务以及禁用防火墙。

1730

被折叠的 条评论
为什么被折叠?



