nginx 备忘录
nginx
it书童
2019-10-05 11:02:58
0赞
0踩
1208阅读
0评论
查找nginx的目录
$ ps -ef | grep nginx
root 493 487 0 Jan26 ? 00:00:00 runsv nginx
root 508 493 0 Jan26 ? 00:00:00 svlogd -tt /var/log/gitlab/nginx
root 11785 493 0 Mar07 ? 00:00:00 nginx: master process /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx
gitlab-+ 27309 11785 0 18:50 ? 00:00:00 nginx: worker process
gitlab-+ 27310 11785 0 18:50 ? 00:00:00 nginx: worker process
gitlab-+ 27311 11785 0 18:50 ? 00:00:00 nginx: cache manager process
root 29271 13098 0 18:51 pts/0 00:00:00 grep --color=auto nginx
其中标识为 master 的即为 nginx 目录
上例带有-p参数,在重启nginx时也需要带上此参数
如:
$ /opt/gitlab/embedded/sbin/nginx -t -p /var/opt/gitlab/nginx
nginx: the configuration file /var/opt/gitlab/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /var/opt/gitlab/nginx/conf/nginx.conf test is successful
$ /opt/gitlab/embedded/sbin/nginx -p /var/opt/gitlab/nginx -s reload
增加页面连接时间
nignx与浏览器请求的连接时间是有限制的,如果超时,会报404,可能通过在nginx.conf
中增加以下配置,加大连接时间。
# 超时设置
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
keepalive_timeout 300;
fastcgi_connect_timeout 6000;
fastcgi_send_timeout 6000;
fastcgi_read_timeout 6000;
fastcgi_buffer_size 256k;
fastcgi_buffers 8 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
- 上一篇: linux 终端快捷键
- 下一篇: nginx 配置动静分离

关于我
一个文科出身的程序员,追求做个有趣的人,传播有价值的知识,微信公众号主要分享读书思考心得,不会有代码类文章,非程序员的同学请放心订阅
转载须注明出处:https://www.itshutong.com/articles/265/nginx-memo
精品付费
个人开发者通过payjs接入微信支付
4815
0
这一次,真正掌握composer
2603
0
相关推荐
nginx 之初窥门径
1092
0
nginx 日志管理
1788
0
nginx 配置文件详解
1422
0
大型网站优化思路
1060
0
nginx日志格式以及关闭对静态资源的日志记录
1399
0
nginx 构建 tomcat 集群
966
0
upstream 指令参数 slow_start
1392
0
负载均衡之url_hash与least_conn
1044
0
nginx 的反向代理缓存
1053
0
nginx 配置动静分离
1036
0