How to solve nginx startup failure

王林
Release: 2020-08-14 17:18:31
forward
7054 people have browsed it

How to solve nginx startup failure

Problem:

(Recommended tutorial: nginx tutorial)

nginx startup failed

systemctl start nginx.service
Copy after login

Startup nginx fails, and the error message is as follows:

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:**** failed (13: Permission denied)
Copy after login

This is usually because SELinux is turned on. Use the command getenforce to check the SELinux status. If the output is enforcing, it means it is turned on.

Use the following methods to close:

1. Temporarily close selinux

setenforce 0 ##设置SELinux 成为permissive模式
setenforce 1 ##设置SELinux 成为enforcing模式
Copy after login

2. Permanently close selinux

修改 /etc/selinux/config 文件
将 SELINUX=enforcing 改为 SELINUX=disabled
Copy after login

3. Restart the machine

The above is the detailed content of How to solve nginx startup failure. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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