我将nginx配置为以下代码
ssl_certificate example.crt;
ssl_certificate_key example.key;
server {
listen 80;
server_name www.example.com example.com;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl;
server_name example.com;
return 200 hello;
}
我希望以200
的价格得到curl -I https://example.com
,但它给了我301
curl -I http://example.com => HTTP/1.1 301 Moved Permanently
location===https://example.com
curl -I https://example.com => HTTP/2 301
location===https://example.com
curl -I https://example.com/asdasd => HTTP/2 301
location===https://example.com/asdasd
任何帮助将不胜感激。预先感谢。