Home >Operation and Maintenance >CentOS >centos installation apache server cannot be accessed
Problem:
Centos7 installation Apache Http server cannot be accessed
Solution:
1. Install Apache components
[root@mycentos shell]# yum install httpd
2. After the installation is successful, check whether there is an httpd process
(recommended tutorial: centos usage tutorial)
[root@mycentos shell]# ps -e |grep httpd
3. If not, enable the service
[root@mycentos shell]# systemctl restart httpd.service
4. Use a browser to access the IP address of this machine, but the link fails.
It should be caused by firewall related settings.
5. Close and disable the firewall
[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. Visit the website again and be able to log in successfully
Related video tutorial recommendations:linux video tutorial
The above is the detailed content of centos installation apache server cannot be accessed. For more information, please follow other related articles on the PHP Chinese website!