Replies: 2 comments 1 reply
-
|
Hi @outofsky! I'm Dosu and I’m helping the Trilium team. 你遇到的 WebSocket 报错,绝大多数是 nginx 反向代理配置缺少 WebSocket 必需的 header 或 proxy_pass 设置不对导致的。Trilium 官方和社区都明确要求 nginx 配置如下(假设 Trilium 监听 8080 端口,部署在根路径): location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
client_max_body_size 0;
}注意事项:
官方文档也有详细说明:Trilium Nginx 反向代理配置 如果还有问题,建议贴出你的 nginx 配置和 Trilium 日志,方便进一步排查。 To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
非常感谢您的及时回复。 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
检查您的反向代理(如 nginx 或 Apache)设置以确保 Websocket 连线没有被阻挡。
nginx 1.28
http 1.1相关配置已经配置
trilium的config.ini只改了信任反向代理为true,其他的没做啥,一直不断报错
TriliumNext Version
0.99.3
What operating system are you using?
Other Linux
What is your setup?
Server access only
Operating System Version
Linux iZbp19d6n0fqt5elpoqoo0Z 5.10.134-18.al8.x86_64 #1 SMP Fri Dec 13 16:56:53 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
Error logs
浏览器报错:与服务器的连线中断 检查您的反向代理(如 nginx 或 Apache)设置以确保 Websocket 连线没有被阻挡。
Beta Was this translation helpful? Give feedback.
All reactions