【发布时间】:2020-03-03 23:07:15
【问题描述】:
我有一个 Django Web 应用程序,它利用带有 gunicorn 应用程序服务器(上游)的 nginx 反向代理。
我的 nginx 日志充满了如下错误:2020/03/03 22:51:57 [error] 9605#9605: *162393 upstream sent too big header while reading response header from upstream, client: 168.155.46.104, server: example.com, request: "GET /static/img/favicons/manifest.json HTTP/2.0", upstream: "http://unix:/home/ubuntu/app/myproj/gunicorn.sock:/static/img/favicons/manifest.json", host: "example.com", referrer: "https://example.com/signup/create-pass/new/6d756265726e2d3131/18/"
我假设 gunicorn 无法为 manifest.json 提供服务。
这不应该发生。我创建了manifest.json 并将其放置在相关位置。在https://realfavicongenerator.net/ 使用网站图标检查器会显示此错误:
The Web App Manifest at https://example/com/static/img/favicons/site.webmanifest cannot be downloaded。如果我直接在浏览器中点击该网址,我最终会看到 502 Bad Gateway 错误。
我该如何解决这个问题?
【问题讨论】: