nginx的权限问题(13: Permission denied)解决办法
错误介绍:
访问接口,无法正常请求数据。查看nginx日志,如图:vim /usr/local/nginx/logs/error.log
open() "/var/temp/nginx/fastcgi/1/24/0000000241" failed (13: Permission denied) while reading upstream, client: 113.89.32.197, server: api2.smty8.com, request: "POST /match/list HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "api2.smty8.com"
解决办法:
查看nginx
启动用户和使用用户是否一致
使用命令ps aux | grep nginx
如图:
一个是www,一个是root用户
打开nginx
配置文件vim /usr/local/nginx/conf/nginx.conf
修改如图所示:
之前我的是www
重启nginx服务service nginx restart
再使用查看命令ps aux | grep nginx
如图:
访问接口,正常请求