Home  >  Article  >  Operation and Maintenance  >  How to solve nginx startup failure

How to solve nginx startup failure

王林
王林forward
2020-08-14 17:18:316856browse

How to solve nginx startup failure

Problem:

(Recommended tutorial: nginx tutorial)

nginx startup failed

systemctl start nginx.service

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

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

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模式

2. Permanently close selinux

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

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete