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

centos installation apache server cannot be accessed

王林
Release: 2020-03-16 19:45:56
Original
3250 people have browsed it

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
Copy after login

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
Copy after login

3. If not, enable the service

[root@mycentos shell]# systemctl restart httpd.service
Copy after login

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.
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template