我想将我的 Web 服务器上的所有 http 请求重写为 https 请求,我从以下内容开始:
服务器 { 听80; 地点 / { 重写 ^(.*) https://mysite.com$1 永久; } ...
一个问题是这会剥离任何子域信息(例如,node1.mysite.com/folder),我如何重写上述内容以将所有内容重新路由到 https 并维护子域?
nginx https redirect
https ×1
nginx ×1
redirect ×1