Nginx 反向代理 (proxy_pass) 不传递子文件夹

Nginx reverse proxy (proxy_pass) does not pass subfolder

我想 运行 应用程序 Mattermost 在子文件夹配置中

https://www.example.com/mattermost/

   location /mattermost/ {
           gzip off;
           proxy_set_header X-Forwarded-Ssl on;
           client_max_body_size 50M;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "upgrade";
           proxy_set_header Host $http_host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Forwarded-Proto $scheme;
           proxy_set_header X-Frame-Options   SAMEORIGIN;
           proxy_pass http://localhost:8065/;
   }

使用此配置,我将传递给正确的应用程序,但该应用程序无法识别子文件夹。它尝试服务器

https://www.example.com/static/style.css instead of https://www.example.com/mattermost/style.css 并引发 404 错误。

如何将子文件夹也传递给 nginx 的反向代理?

我想 运行 申请的是 "Mattermost"。正如我现在可以确认的那样,版本

无法用作子文件夹

Mattermost 团队版版本:3.0.0 (3.0.3)

更多信息:

http://forum.mattermost.org/t/blank-page-when-installing-mattermost-with-nginx-proxy-pass-as-subdirectory/1604/8

更新:正如在上面的论坛中确认的那样,Mattermost 目前无法配置子文件夹。