![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nginx
文章平均质量分 74
LF-DevJourney
这个作者很懒,什么都没留下…
展开
-
Nginx Location 规则解析:深入剖析 Location 优先级匹配机制
一文带你读懂nginx location的匹配规则。原创 2024-01-15 19:50:24 · 1082 阅读 · 1 评论 -
记录由客户端http请求原因引起的5xx响应问题排查过程
看到 http 状态码 5xx,很多开发者第一感觉就是服务端的问题,其实并不全是。下面我遇到的问题就是一个例外。原创 2024-01-12 16:29:20 · 1506 阅读 · 1 评论 -
Nginx “Primary script unknown“?定位及排除方法。
详情参考How to debug “FastCGI sent in stderr: Primary script unknown while reading response header from upstream” and find the actual error message?方案1,开启upstream(php-fpm)日志。通过日志查看处理请求的脚本文件路径。php-fpm.d/www.confaccess.log = /var/log/$pool.access.logtail -f原创 2021-04-13 14:22:32 · 644 阅读 · 0 评论 -
gitlab安装,备份,使用自建服务器,以及常见问题的解决方案。
参考Gitlab Docinstall-and-configure-gitlab-on-centos-7如果全新的安装会很容易,再已安装的机器上再次安装时,会有很多莫名奇妙的问题。这时可以通过安装时的提示,以及参考/var/log/gitlab下的日志来定位问题安装前一定要清理完之前的版本(好多问题可以清理重新从头安装来解决)使用yum info gitlab-ce确认,使用yum remove gitlab-ce移除使用rpm -qa | grep gitlab确认,使用rpm -e gitl原创 2020-12-31 18:45:42 · 3138 阅读 · 0 评论 -
不中断服务在线平滑升级nginx (CentOS)
在对网站服务器进行漏洞扫描时,发现了一个较严重的漏洞 SSL/TLS协议信息泄露漏洞(CVE-2016-2183)查看下同的openssl 版本$ openssl versionOpenSSL 1.0.2k-fips 26 Jan 2017系统使用的 nginx, 查看nginx编译用的OpenSSL版本$nginx -Vnginx version: nginx/1.16.1built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)built原创 2020-12-25 18:56:15 · 1213 阅读 · 2 评论 -
worker_connections are not enough
在nginx的配置文件中/etc/nginx/nginx.conf修改worker_connections, 参考worker_connections are not enoughevents { worker_connections 20000;}原创 2020-09-29 20:57:33 · 2265 阅读 · 0 评论 -
nginx accept() failed (24: Too many open files)
在nginx的配置文件中/etc/nginx/nginx.conf修改worker_rlimit_nofile,参考nginx loadbalancer Too many open files 和Too many open files with nginx, can’t seem to raise limitworker_rlimit_nofile 30000;可以切换到nginx用户下(比如nginx,nobody,www等), 使用ulimit查看是否生效su - nobodyulimit原创 2020-09-29 20:56:56 · 304 阅读 · 0 评论 -
nginx: [emerg] “proxy_pass“ cannot have URI part in location given by regular expression, or inside
参考SO: nginx ‘proxy_pass’ cannot have URI part in location?使用下面的配置会出现上面的问题location ~ ^/web/(project1|project2|project3)/$ { proxy_pass https://example.com/h5/;}原因:nginx cannot process your desired URI part in the proxy_pass directivebecause you’re原创 2020-07-24 09:49:56 · 13410 阅读 · 3 评论 -
nginx 路径替换
下面使用一个简单的例子来说明路径替换,配置了两个路径指向同一个项目。location ^~ /internal/project/ {allow 127.0.0.1;allow 172.16.0.0/16;allow 172.17.93.0/24;deny all;proxy_pass https://example.com/external/project/;}location ~ /external/ {root /var/www/html;index index.html;}Pr原创 2020-07-24 09:40:17 · 6021 阅读 · 0 评论 -
nginx: [emerg] a duplicate default server for
StackOverflow: nginx: [emerg] a duplicate default server forGithub: Error: duplicate listen options for [::]:443 #5550原创 2020-04-22 16:20:31 · 2392 阅读 · 0 评论 -
pread() read only xxxx of yyyy
Refer to pread() read only xxxx of yyyy通常是读取正在修改的文件造成的。原创 2020-03-04 19:27:41 · 784 阅读 · 0 评论 -
nginx 访问频率限制 (limit_req_zone) 及白名单配置
https://www.nginx.com/blog/rate-limiting-nginx/原创 2020-03-03 10:08:01 · 2479 阅读 · 0 评论