gpt4 book ai didi

linux - nginx 设置为反向代理的目录重定向问题

转载 作者:行者123 更新时间:2023-12-04 19:27:35 24 4
gpt4 key购买 nike

我已经通过 Reverse Foloxy 配置了服务器,如下所示:
Nginx 反向代理(SSL 终止) - Varnish 缓存 - Nginx Web 服务器(8080 端口)
但是,它存在以下问题:例如,如果您转到https://www.example.com/static (这只是一个示例,您的域不是我的站点),您将被重定向到 http://www.example.com:8080/static/ .不仅访问 staic ,而且访问其他目录时也是如此。我想知道如何做 nginx.conf 等来解决这个问题。

最佳答案

port_in_redirect off;
Nginx Web 服务器(8080 端口)通过将上述设置添加到相应的服务器 block 来解决。

关于linux - nginx 设置为反向代理的目录重定向问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69610606/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com