【发布时间】:2017-04-28 07:36:02
【问题描述】:
我正在尝试使用 nginx 将 URL http://example.com:88/test/ 更改为 https://example.com/test。我尝试在端口 88 块中使用重写,但没有奏效。
目前我正在使用。
server {
listen 88;
server_name example.com
return 301 https://$host$request_uri;
}
目前http://example.com:88/test/发送到https://example.com:88/test/
【问题讨论】:
-
来自nginx $host
in this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a request
标签: nginx