在80端口的那个server下,添加如下:

server_name  www.youwebsite.com youwebsite.com;

rewrite ^(.*)$ https://$host$1 permanent;

nginx 配置http重定向到https

 

然后访问 www.网站.com  网站.com

会自动跳转到https下

 

相关文章:

  • 2022-01-10
  • 2021-12-03
  • 2021-06-04
  • 2021-12-03
  • 2021-11-21
  • 2021-10-03
猜你喜欢
  • 2021-11-19
  • 2021-11-22
  • 2021-08-18
  • 2021-08-09
  • 2022-12-23
  • 2021-12-13
相关资源
相似解决方案