nginx配置文件 http 强跳转 https
程序员文章站
2023-01-16 11:31:00
server { listen 80; server_name www.xxxx.com; if ($host = "www.xxxx.com"){ return 301 https://www.xxxx.com$request_uri; } } ......
server {
listen 80;
server_name www.xxxx.com;
if ($host = "www.xxxx.com"){
return 301 https://www.xxxx.com$request_uri;
}
}
推荐阅读
-
Nginx出现The plain HTTP request was sent to HTTPS port问题解决方法
-
Nginx实现根据域名http、https分发配置示例
-
Tomcat配置https并访问http自动跳转至https
-
Nginx服务器中HTTP 301跳转到带www的域名的方法
-
apache设置自动将http跳转到https的方法
-
Apache mod_rewrite实现HTTP和HTTPS重定向跳转
-
Apache由http自动跳转到https的多种方法
-
如何通过nginx负载均衡跳转https
-
nginx配置文件 http 强跳转 https
-
详解nginx服务器http重定向到https的正确写法