nginx权限问题failed(13:Permission denied)
nginx权限问题failed(13:Permission denied)
nginx Permission denied 问题:
使用nginx代理uwsgi,出现500错误,查看nginx的error日志显示failed (13: Permission denied)
由于要使用内网传输数据,便用了一台手机作为服务器进行内网穿透,但是在搭建的过程中,一直无法进入网页,网页上面只显示一个500错误。在排除不是uwsgi和python程序错误后,将目标锁定到了nginx上面。
通过查看nginx日志,出现了failed (13: Permission denied)错误,发现是权限的问题,就将/etc/nginx/nginx.conf中的第一行改为root
具体执行如下
sudo su #获得最高权限
cd /etc/nginx/ #进入nginx目录
vim nginx.conf #编辑nginx.conf
将user www-data; 修改为 user root;
然后在/etc/nginx目录使用nginx -s reload 命令重新加载配置
后记:
我在阿里云服务器布置nginx代理uwsgi从来没有出现这样的问题,大概是因为阿里云服务器默认进去就是最高权限,而用手机搭建的服务器进去只是普通权限,然后进行代理的使用没办法调用uwsgi。
服务器出现问题要多看日志,这样查找问题的时候就不会两眼抓瞎了。
(O_o)(o_O)
( ´_ゝ`)✎
nginx权限问题failed(13:Permission denied)的更多相关文章
- nginx 502错 failed (13: Permission denied)
安装nginx和php-fpm之后出现502错误 找了个理由说php-fpm不启动 ,但在我的实践中,该过程开始 找了半天没找到病因.视图nginx记录后 我发现下面的错误 [crit] 2686#0 ...
- nginx报错:failed (13: Permission denied)
vim nginx.conf 修改user nginx为当前系统用户,如:user root
- 解决Nginx的connect() to 127.0.0.1:8080 failed (13: Permission denied) while connect
在进行Nginx+Tomcat 负载均衡的时候遇到了这个权限问题,在error.log日志中.我们能够看到例如以下: connect() to 127.0.0.1:8080 failed (13: P ...
- Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) nginx 启动失败
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) nginx 启动失败 ...
- nginx: [emerg] open() "/var/run/nginx.pid" failed (13: Permission denied)
现象 1.centos6.9 用rpm包安装nginx 2.修改Nginx的多个配置文件和配置项 3.service nginx restart 报错: nginx: [emerg] open() & ...
- 解决nginx报错:nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied)
报错描述: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) 通过ansible远程给主机更换端口并重新启动ng ...
- Ubuntu nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
在Ubuntu 12中启动刚安装好的Nginx,报错: nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied) 原因如下: ...
- 解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
brew services restart nginx Stopping nginx... (might take a while) ==> Successfully stopped nginx ...
- 解决nginx访问问题connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream,
问题:搭建好项目之后,用nginx进行代理,进行日常配置之后,发现前端正常访问,但是后端访问出现错误,报502错误,查找nginx日志,发现connect() to 127.0.0.1:8080 fa ...
随机推荐
- js-实现双色球功能
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&qu ...
- JQuery实用技巧
1.关于页面元素的引用通过jquery的$()引用元素包括通过id.class.元素名以及元素的层级关系及dom或者xpath条件等方法,且返回的对象为jquery对象(集合对象),不能直接调用dom ...
- VisualSVN 破解方法
第一步,首先准备反汇编工具 ildasm.exe,找到VisualSVN的安装路径,一般先备份,在备份里面操作. 第二步,转储 , 得到同名的il文件:VisualSVN.Core.L.il,用记事本 ...
- 【vue】http-server开启本地服务
在写前端页面中,经常会在浏览器运行HTML页面,从本地文件夹中直接打开的一般都是file协议,当代码中存在http或https的链接时,HTML页面就无法正常打开,为了解决这种情况,需要在在本地开启一 ...
- 【计算机网络】网络层学习笔记:总结IP,NAT和DHCP
前言:这篇文章是学习网络层协议时候总结的笔记,前面的主要部分介绍的都是IP协议, 后半部分介绍NAT协议和DHCP协议 参考书籍 <计算机网络-自顶向下> 作者 James F ...
- Pyhon 中文编码问题(字符串前加‘U’)
中文编码问题是用中文的程序员经常头大的问题,在python下也是如此,那么应该怎么理解和解决python的编码问题呢? 我们要知道python内部使用的是unicode编码,而外部却要面对千奇百怪的各 ...
- solr 加载 停用/扩展词典
startup.bat 停止词典的效果
- mysql日期时间函数使用总结
获取函数 mysql默认的时间格式: yyyy-MM-dd 或者 yyyy-MM-dd HH:mm:ss 1. Date() 返回日期部分, date('2018-02-14 17:03:04') ...
- git使用分支与tag
查看分支:git branch 创建分支:git branch <name> 切换分支:git checkout <name> 创建+切换分支:git checkout -b ...
- odoo开发笔记-- 按钮动作跳转到其他列表视图默认搜索
按钮动作跳转到其他列表视图 按照默认指定的条件搜索显示. 效果: 实现方式: