随笔分类 -  nginx

摘要:目的: 通过配置max_fails、fail_timeout来达到当一台服务器访问出现非200时可以跳转到另一台服务器 操作: 配置nginx.conf文件 具体配置如下 upstream Site { ip_hash; server localhost1:18080 max_fails=10 fa 阅读全文
posted @ 2019-11-12 15:51 littlewrong 阅读(9266) 评论(0) 推荐(1) 编辑
摘要:1、问题解决办法 2、Timeout Wait及各种状态时序图: 文章参考: https://blog.csdn.net/chengm8/article/details/51668992 https://blog.csdn.net/qw3672939/article/details/83746604 阅读全文
posted @ 2019-07-31 22:20 littlewrong 阅读(1034) 评论(0) 推荐(0) 编辑
摘要:一般看来, 这种情况可能是由于nginx默认的fastcgi进程响应的缓冲区太小造成的, 这将导致fastcgi进程被挂起, 如果你的fastcgi服务对这个挂起处理的不好, 那么最后就极有可能导致504 Gateway Time-out现在的网站, 尤其某些论坛有大量的回复和很多内容的, 一个页面 阅读全文
posted @ 2019-02-02 09:02 littlewrong 阅读(4027) 评论(0) 推荐(0) 编辑
摘要:yum install -y gcc gcc-c++ openssl openssl-devel 目前keepalived最新版本下载:[root@rhel ~]#wget -c http://www.keepalived.org/software/keepalived-1.2.12.tar.gz[ 阅读全文
posted @ 2018-11-18 12:37 littlewrong 阅读(196) 评论(0) 推荐(0) 编辑
摘要:ginx并发模型: nginx 的进程模型采用的是prefork方式,预先分配的worker子进程数量由配置文件指定,默认为1,不超过1024。master主进程创建监听套接口,fork子进程以后,由worker进程监听客户连接,每个worker子进程独自尝试accept已连接套接口,accept是 阅读全文
posted @ 2018-08-25 17:05 littlewrong 阅读(421) 评论(0) 推荐(0) 编辑
摘要:引用来源:https://www.cnblogs.com/zhxx/p/7741939.html 实验目的 主Nginx挂掉,从nginx可以立即工作 利用vrrp技术,提供vip 当主nginx挂掉,利用脚本关闭主keepalied,keepalived通过vrrp技术实现从机获得vip,在从机安 阅读全文
posted @ 2018-08-17 10:23 littlewrong 阅读(865) 评论(0) 推荐(1) 编辑
摘要:安装路径:/application/nginx-1.20.2 1.前期准备安装编译需要的gcc和gcc-c++ yum install -y gcc gcc-c++ nginx依赖pcre-devel、openssl-devel、zlib-devel yum install -y pcre pcre 阅读全文
posted @ 2018-01-04 11:28 littlewrong 阅读(1953) 评论(0) 推荐(0) 编辑
摘要:1.错误日志:warn:an upstream response is buffered to a temporary file 解决办法:增加fastcgi_buffers 8 4K; fastcgi_buffer_size 4K; 2. a client request body is buff 阅读全文
posted @ 2017-06-25 12:01 littlewrong 阅读(22775) 评论(0) 推荐(0) 编辑
摘要:安装成功! 输入:systemctl start nginx 来启动nginx。 输入:systemctl enable nginx 来设置nginx的开机启动(linux宕机、重启会自动运行nginx不需要连上去输入命令)。 nginx -s quit 关闭Nginx ps -ef|grep ng 阅读全文
posted @ 2017-03-10 13:40 littlewrong 阅读(260) 评论(0) 推荐(0) 编辑
摘要:1. 启用nginx status配置 在默认主机里面加上location或者你希望能访问到的主机里面。server { listen *:80 default_server; server_name _; location /ngx_status { stub_status on; access_ 阅读全文
posted @ 2017-02-24 14:01 littlewrong 阅读(453) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示