nginx 启动失败,日志里面报错信息如下:

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

原因seLinux限制了http的端口

getenforce   这个命令可以查看当前是否开启了selinux 如果输出 disabled 或 permissive 那就是关闭了

如果输出 enforcing 那就是开启了 selinux

1、临时关闭selinux

setenforce 0    ##设置SELinux 成为permissive模式

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

2、永久关闭selinux,

修改/etc/selinux/config 文件

将SELINUX=enforcing改为SELINUX=disabled

重启机器即可

相关文章:

  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2021-06-09
  • 2022-01-07
  • 2022-03-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案