Home  >  Article  >  Operation and Maintenance  >  centos installation apache server cannot be accessed

centos installation apache server cannot be accessed

王林
王林Original
2020-03-16 19:45:563132browse

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

centos installation apache server cannot be accessed

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn