server {
  listen 80;
  server_name www.huazaitiandi.com; #需要将yourdomain替换成证书绑定的域名。
  rewrite ^(.*)$ https://$host$1; #将所有HTTP请求通过rewrite指令重定向到HTTPS。
  location / {
    index index.html index.htm;
  }
}

posted on 2022-09-26 18:03  何石-博客  阅读(317)  评论(0编辑  收藏  举报