本文摘自PHP中文网,作者V,侵删。

问题:
Centos7安装Apache Http服务器无法访问
解决方法:
1、安装Apache组件
1 | [root@mycentos shell]# yum install httpd
|
2、安装成功后,检测有无httpd进程
(推荐教程:centos使用教程)
1 | [root@mycentos shell]# ps -e |grep httpd
|
3、如没有,启用该服务
1 | [root@mycentos shell]# systemctl restart httpd.service
|
4、使用浏览器访问本机IP地址,显示链接失败。
应该是防火墙相关设置问题导致。
5、关闭并禁用防火墙
1 2 3 4 | [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、再次访问网站,能够成功登录

相关视频教程推荐:linux视频教程
以上就是centos安装apache服务器无法访问的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
如何解决CentOS无法上传文件
CentOS无法访问ssh怎么办?
apache atlas是什么意思
怎么卸载apache服务器
CentOS怎么启动网卡设备
CentOS找不到网卡配置文件怎么办
apache怎么重启
apache的poi是什么
CentOS下执行su命令切换root用户时提示认证失败
如何在CentOS和rhel上安装最新的nodejs
更多相关阅读请进入《CentOS》频道 >>
转载请注明出处:木庄网络博客 » centos安装apache服务器无法访问