我想在子文件夹配置中运行应用程序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而不是https://www.example.com/mattermost/style.css并显示404错误。
如何使用nginx将子文件夹传递给反向代理?
I want to run the application Mattermost in a subfolderconfiguration like
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/; }With this configuration I'll get passed to the correct application but the application does not recognize the subfolder. It tries to server
https://www.example.com/static/style.css instead of https://www.example.com/mattermost/style.css and brings up a 404 error.
How can I pass also the subfolder to the reverse proxy with nginx?
最满意答案
我想要运行的应用程序是“Mattermost”。 正如我现在可以确认的那样,版本无法使用子文件夹
Mattermost Team Edition版本: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无法进行子文件夹配置。
The application I wanted to get running was "Mattermost". As I now can confirm, the use as subfolder is not possible with the Version
Mattermost Team Edition Version: 3.0.0 (3.0.3)
Further information:
http://forum.mattermost.org/t/blank-page-when-installing-mattermost-with-nginx-proxy-pass-as-subdirectory/1604/8
Update: As confirmed in the forum above, a subfolder configuration is not possible with Mattermost right now.
更多推荐
发布评论