在http的server里增加rewrite ^(.*) https://$host$1 permanent;

这样就可以实现80进来的请求,重定向为https了。