晨风

-------------------- 业精于勤,荒于嬉;行成于思,毁于随

导航

Nginx配置http强跳https

Posted on 2023-12-27 14:02  shenyixin  阅读(5)  评论(0编辑  收藏  举报
server {
    listen 80;
    server_name example.com;  
    # HTTP重定向到HTTPS
    rewrite ^(.*)$ https://$host$1 permanent;
}