当前位置: 首页 > news >正文

nginx: bind() to 0.0.0.0:8001 failed (13: Permission denied)

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

启动nginx的时候遇到问题:

2014/01/10 09:20:02 [emerg] 30181#0: bind() to 0.0.0.0:8001 failed (13: Permission denied)

in /var/log/nginx/error.log

开始以为是root权限问题,可是切到root之后发现问题依旧,后来发现是跟防火墙相关,之前关掉防火墙之后没有重启server.

或者用下面的方法打开某个端口:

This will most likely be related to SELinux

semanage port -l | grep http_port_t
http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000

As you can see from the output above with SELinux in enforcing mode http is only allowed to bind to the listed ports. The solution is to add the ports you want to bind on to the list

semanage port -a -t http_port_t  -p tcp 8090

will add port 8090 to the list.

转载于:https://my.oschina.net/aibati2008/blog/729674

相关文章:

  • Linux统计文件行数
  • ACM竞赛:立方和问题
  • 初级运维(一)
  • 九曲黄河万里沙,浪淘风簸自天涯 — 正则表达式
  • 【PHP】函数explode和split的区别
  • IIS下配置PHP
  • OGNL表达式介绍
  • CSS——NO.8(代码简写)
  • Sqli-labs less 10
  • Crontab创建定时任务
  • 使用maven进行测试设置断点调试的方法
  • Oracle 11gR2 RAC 常用维护操作 说明
  • 分布式任务队列Celery
  • POJ1323 Game Prediction(贪心)
  • 过滤squidlog中各个链接的大小
  • [译]如何构建服务器端web组件,为何要构建?
  • conda常用的命令
  • css选择器
  • echarts花样作死的坑
  • fetch 从初识到应用
  • Puppeteer:浏览器控制器
  • Service Worker
  • 阿里研究院入选中国企业智库系统影响力榜
  • ------- 计算机网络基础
  • 技术发展面试
  • 深入 Nginx 之配置篇
  • 项目实战-Api的解决方案
  • 硬币翻转问题,区间操作
  • 原创:新手布局福音!微信小程序使用flex的一些基础样式属性(一)
  • 字符串匹配基础上
  • 数据可视化之下发图实践
  • 正则表达式-基础知识Review
  • #Lua:Lua调用C++生成的DLL库
  • (Redis使用系列) Springboot 整合Redisson 实现分布式锁 七
  • (附源码)springboot青少年公共卫生教育平台 毕业设计 643214
  • (附源码)ssm考试题库管理系统 毕业设计 069043
  • (附源码)计算机毕业设计大学生兼职系统
  • (十八)devops持续集成开发——使用docker安装部署jenkins流水线服务
  • (原创)Stanford Machine Learning (by Andrew NG) --- (week 9) Anomaly DetectionRecommender Systems...
  • (转)C#开发微信门户及应用(1)--开始使用微信接口
  • (转)jdk与jre的区别
  • (转)程序员技术练级攻略
  • .NET Framework Client Profile - a Subset of the .NET Framework Redistribution
  • .Net MVC + EF搭建学生管理系统
  • @autowired注解作用_Spring Boot进阶教程——注解大全(建议收藏!)
  • @Bean注解详解
  • @RestController注解的使用
  • [2018/11/18] Java数据结构(2) 简单排序 冒泡排序 选择排序 插入排序
  • [Android] Android ActivityManager
  • [Android]通过PhoneLookup读取所有电话号码
  • [AS3]URLLoader+URLRequest+JPGEncoder实现BitmapData图片数据保存
  • [BZOJ1053][HAOI2007]反素数ant
  • [BZOJ1877][SDOI2009]晨跑[最大流+费用流]
  • [bzoj4010][HNOI2015]菜肴制作_贪心_拓扑排序
  • [C/C++]数据结构 堆的详解