1、nginx安装,配置完成之后,尝试访问没有响应,主机可以ping通,/var/log/nginx/access.log日志没有查到任何记录

解决方法:查看linux防火墙,关闭

命令:iptables -F INPUT

 

2、/var/log/nginx/access.log能查到记录,但总出现如下错误:

 

[plain] view plain copy
  1. 2015/08/12 14:02:36 [error] 16620#0: *1 open() "/data/www/*****/src/auth_login.html" failed (13: Permission denied), client: 113.66.188.74, server: 103.245.81.213, request: "GET /auth_login.html HTTP/1.1", host: "103.245.81.213"  

查看了一下nginx进程ps aux|grep nginx
发现都是nobody的进程,但是nginx的目录都是root用户,另外集群tomcat也是属于root用户,而且root启动,查看nginx.conf:

user nobody
改成:user root
停止nginx -s stop
重启nginx -c nginx.conf

(使用service nginx reload/restart无效,暂时不知道为什么)

相关文章:

  • 2021-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2021-12-04
  • 2021-11-25
  • 2022-12-23
猜你喜欢
  • 2021-08-29
  • 2022-12-23
  • 2021-08-26
  • 2021-09-23
  • 2022-12-23
  • 2021-09-09
  • 2021-04-11
相关资源
相似解决方案