server { listen 80; server_name www.xxxx.com; if ($host = "www.xxxx.com"){ return 301 https://www.xxxx.com$request_uri; } }
nginx配置文件 http 强跳转 https
原文:https://www.cnblogs.com/jackcui/p/11642650.html