nginx启动失败怎么办,如何解决?

Infocode蓝畅 互联网开发 565

nginx启动失败怎么办?

nginx启动失败怎么办?
nginx启动失败怎么办?

nginx启动失败systemctl start nginx.service

启动nginx失败,报错信息如下:Starting nginx: nginx: [emerg] bind() to 0.0.0.0:**** failed (13: Permission denied)

这通常是因为开启了SELinux的原因,使用命令 getenforce 可以查看SELinux状态,如果输出为 enforcing 表示已开启。

用以下方法关闭:

1、临时关闭selinuxsetenforce 0 ##设置SELinux 成为permissive模式

setenforce 1 ##设置SELinux 成为enforcing模式

2、永久关闭selinux修改 /etc/selinux/config 文件

将 SELINUX=enforcing 改为 SELINUX=disabled

3、重启机器即可




请在浏览器中启用JavaScript来完成此表单。
请输入姓名或昵称
如果您有任何疑问、需要更多信息或希望与我们建立合作请留言
=
( function() { const style = document.createElement( 'style' ); style.appendChild( document.createTextNode( '#wpforms-17950-field_1-container { position: absolute !important; overflow: hidden !important; display: inline !important; height: 1px !important; width: 1px !important; z-index: -1000 !important; padding: 0 !important; } #wpforms-17950-field_1-container input { visibility: hidden; } #wpforms-conversational-form-page #wpforms-17950-field_1-container label { counter-increment: none; }' ) ); document.head.appendChild( style ); document.currentScript?.remove(); } )();
加载

回复

我来回复
  • 暂无回复内容