upstream https {
 server server.liumou.site:443;
}
server {
  listen 80;
  listen [::]:80;
  server_name liumou.site;
  client_max_body_size 1024m;
  location / {
    proxy_pass https://https;
    proxy_set_header HOST $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
  # 匹配域名并进行跳转
   if ($host ~* "^liumou.site$") {
       rewrite ^/(.*)$ https://liumou.site/ permanent;
    }
  error_page 404  https://liumou.site;
  error_page 497  https://liumou.site;
  error_page 301  https://liumou.site;
}

设置跳转之前请确保HTTPS站点访问正常