惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy International News Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
Cloudbric
Cloudbric
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tenable Blog
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
V
Visual Studio Blog
P
Proofpoint News Feed
Webroot Blog
Webroot Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Jina AI
Jina AI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东

筑语日志 - mgt

修复首页来访板块的主页链接bug - 筑语日志 nginx 升级至1.31.0 - 筑语日志 被百度收录 - 筑语日志 已删除评论bug修复 - 筑语日志 修复CMYK色彩传图失败的bug - 筑语日志 个人主页可以通过用户名访问了 - 筑语日志 增设换图功能 - 筑语日志 增设删图功能 - 筑语日志 首页动态页码更新、增设link预览 - 筑语日志 Gravatar头像代理 - 筑语日志
mini的nginx代理bug修复 - 筑语日志
mgt · 2026-04-25 · via 筑语日志 - mgt

RT

1.主服务器需要反代到mini,但mini为动态IP,之前已经写了动态更新dns,但是时间太大了,修改为60s再测试一下;

location /compare_similarity {
# 其他配置
resolver 114.114.114.114 8.8.8.8 valid=60s;
}

2.mini上的nginx总是出现端口复用绑定失败的提醒,排查了一下似乎是因为macos的启动项设置造成的,关闭了开机启动nginx的plist配置,直接通过手动启动,问题解决。
报错信息如下:

2026/04/25 09:36:13 [warn] 17279#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /opt/homebrew/Cellar/nginx/conf/nginx.conf:2 2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8446 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8444 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8446 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8444 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8446 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8444 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8446 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8444 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8446 failed (48: Address already in use) 2026/04/25 09:36:13 [emerg] 17279#0: bind() to 0.0.0.0:8444 failed (48: Address already in use)2026/04/25 09:36:13 [emerg] 17279#0: still could not bind()

通过launchctl关掉nginx,改为下面的手动命令管理nginx,报错就消失了

sudo /opt/homebrew/Cellar/nginx/sbin/nginx

3.mini上发现error.log已经有2G多了,用AI弄了一个手动切割脚本,再打开快多了.
新建clear.bash,增加执行权限,编辑内容

touch clear.sh
chmod u+x,g+x clear.sh
vi clear.sh

脚本内容如下

!/bin/bash
LOG_PATH="/usr/local/nginx/logs" # 你的日志路径

#YESTERDAY=$(date -v-1d +%Y-%m-%d)    # macOS 写法
YESTERDAY=$(date -d "yesterday" +%Y-%m-%d)   # linux 写法
# 1. 移动并重命名文件
mv ${LOG_PATH}/access.log ${LOG_PATH}/access_${YESTERDAY}.log
mv ${LOG_PATH}/error.log ${LOG_PATH}/error_${YESTERDAY}.log
# 2. 向 Nginx 发送信号重新创建 access.log
# 这是 Nginx 的特性:收到 USR1 信号后会关闭当前日志并重新打开(不重启服务)
kill -USR1 $(ps aux | grep "nginx: master process" | grep -v grep | awk '{print $2}')

4.blog新建文章总是链接跳转失败,后端报错如下,Gemini判断是localhost写法会导致ipv6问题,都建议改为127.0.0.1,问题解决

2026/04/25 10:51:43 [error] 30042#0: *856882 connect() failed (111: Connection refused) while con necting to upstream, client: xx.xx.xx.xx, server: blog.zhuyu.xyz, request: "GET /admin/manage-p osts.php?page=1 HTTP/1.1", upstream: "fastcgi://[::1]:9000", host: "blog.zhuyu.xyz", referrer: "h ttps://blog.zhuyu.xyz/admin/write-post.php?cid=458"