![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nginx
文章平均质量分 95
pigfu
个人随笔
展开
-
通过Nginx重新认识HTTP错误码
本文描述了HTTP常见错误码和什么情况下Nginx触发什么样的的错误原创 2023-10-01 22:04:22 · 1724 阅读 · 1 评论 -
记一次nginx负载均衡健康检查引起的事故之no live upstreams while connecting to upstream
本文从一个线上事故说起,全面讲解Nginx 负载均衡的配置和使用。原创 2023-09-24 15:30:05 · 2168 阅读 · 1 评论 -
【转发】Nginx 对 Connection 头的处理过程
标准RFC2616 中,对 Connection 的说明如下:HTTP/1.1 proxies MUST parse the Connection header field before a message is forwarded and, for each connection-token in this field, remove any header field(s) from the message with the same name as the connection-token. Co转载 2021-05-04 18:27:41 · 1161 阅读 · 0 评论 -
聊一聊nginx开启TCP Keep-Alives
nginx开启KeepAlive有两种方式,第一种使用listen指令下的so_keepalive=on|off|[keepidle]:[keepintvl]:[keepcnt] 关键字,此选项自2011-12-12在nginx 1.1.11及更高版本中可用,其中。。。。原创 2021-05-05 18:52:14 · 1365 阅读 · 0 评论 -
nginx http header [Connection: keep-alive]的实现原理
http keep-alive实现了对同一tcp连接的复用,即可以在一个TCP连接中发送多个HTTP请求,这种技术叫做HTTP复用(HTTP Multiplexing),与TCP连接复用是完全不同的技术,不要混淆了。HTTP复用(对同一tcp连接的复用)只是针对同一个客户端来说的,对于不同的客户端是无法做到的,要想实现就需要TCP复用技术了。原创 2021-05-04 17:56:01 · 1991 阅读 · 0 评论 -
nginx 添加http header头,进行跨域设置(“add_header“ directive is not allowed)
有时候我们想对某个项目进行跨域访问限制,不管是静态目录文件,还是其他。动态文件还好说,可以在代码里添加,如php:header('Access-Control-Allow-Origin: http://www.a.com')header('Access-Control-Allow-Origin: http://www.b.com')但静态目录文件,如图片等,就麻烦了,别急,这时就可以考nginx解决解决方案location ~* \.ico|jpg|gif|png|js|css|woff2|tt原创 2020-09-13 17:19:18 · 11744 阅读 · 0 评论