Home >Operation and Maintenance >CentOS >What should I do if nginx cannot be accessed under centos?

What should I do if nginx cannot be accessed under centos?

王林
王林Original
2020-05-20 15:28:583022browse

What should I do if nginx cannot be accessed under centos?

Problem description:

Installing centos7 in VMware and completing nginx installation and configuration, the host cannot be accessed.

Cause analysis:

The virtual machine does not allow Nginx default port 80.

Solution:

First, open port 80

firewall-cmd --permanent --add-port=80/tcp

Then restart the firewall

firewall-cmd --reload

Recommended tutorial: centos tutorial

The above is the detailed content of What should I do if nginx cannot be accessed under centos?. 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