nginx问题集

nginx启动关闭操作

nginx -s reload:修改配置后重新加载生效
nginx -s reopen:重新打开日志文件
nginx -t -c /path/to/nginx.conf 测试nginx配置文件是否正确
    关闭nginx:
nginx -s stop:快速停止nginx
                quit:完整有序的停止nginx
    其他的停止nginx 方式:
ps -ef | grep nginx
kill -QUIT 主进程号:从容停止Nginx
kill -TERM 主进程号:快速停止Nginx
pkill -9 nginx:强制停止Nginx
启动nginx:
nginx -c /path/to/nginx.conf
平滑重启nginx:
kill -HUP 主进程号
https://www.cnblogs.com/xiaoL/p/6964217.html

1、nginx反向代理,request.getServerName()的问题

https://blog.csdn.net/lxl631/article/details/42004349

2、nginx 后端服务器配置端口 request.getserverPort

https://blog.csdn.net/shi0299/article/details/52052118

3、413 Request Entity Too Large

https://blog.csdn.net/li396864285/article/details/53522828

4、nginx出现 “414 request-uri too large”

https://blog.csdn.net/hanchao_h/article/details/69945557

5、前台Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH,后台错误2015/05/30 00:11:53 [crit] 8808#0: *60 open() "/var/cache/nginx/proxy_temp/2/01/0000000012" failed (13: Permission denied)

proxy_temp目录的group设置为nginx,并赋予rwx权限

[root@nginx nginx-build]# ls -l
total 36
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 client_body_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:14 conf
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 fastcgi_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:03 html
drwxrwxrwx. 2 nginx  nginx 4096 Nov  2 17:00 logs
drwx------. 2 nobody nginx 4096 Nov  1 15:03 proxy_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:03 sbin
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 scgi_temp
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 uwsgi_temp
[root@nginx nginx-build]# chown -Rf nginx:nginx /home/nginx/Software/nginx/nginx-1.14.0/nginx-build/proxy_temp
[root@nginx nginx-build]# ls -l
total 36
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 client_body_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:14 conf
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 fastcgi_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:03 html
drwxrwxrwx. 2 nginx  nginx 4096 Nov  2 17:00 logs
drwx------. 2 nginx  nginx 4096 Nov  1 15:03 proxy_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:03 sbin
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 scgi_temp
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 uwsgi_temp
[root@nginx nginx-build]# chmod 777 /home/nginx/Software/nginx/nginx-1.14.0/nginx-build/proxy_temp
[root@nginx nginx-build]# ls -l
total 36
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 client_body_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:14 conf
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 fastcgi_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:03 html
drwxrwxrwx. 2 nginx  nginx 4096 Nov  2 17:00 logs
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:03 proxy_temp
drwxrwxrwx. 2 nginx  nginx 4096 Nov  1 15:03 sbin
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 scgi_temp
drwxrwxrwx. 2 nobody nginx 4096 Nov  1 15:03 uwsgi_temp

https://blog.csdn.net/oldcrane/article/details/46274189

猜你喜欢

转载自my.oschina.net/u/3769440/blog/1919979
今日推荐