nginx 如何想同时支持https和http,必须监听两个不同的端口,比如http:listen 80; https:listen 443;
server {
listen 1234 ssl;
server_name your.site.tld;
ssl on;
...
error_page 497 https://$host:1234$request_uri;
...
}
自定义端口上,这样子可以强制跳转.
2023-02-03 07:40:04
listen 1234 ssl;
server_name your.site.tld;
ssl on;
...
error_page 497 https://$host:1234$request_uri;
...
}
自定义端口上,这样子可以强制跳转.