首页 > Web开发 > 详细

nginx + php + https 配置

时间:2019-10-11 00:54:48      阅读:117      评论:0      收藏:0      [点我收藏+]
server {
        listen 80;
        server_name   你的域名或IP;
        rewrite ^(.*)$  https://$host$1 permanent;
}

server {
        listen 443 ssl;
        server_name 你的域名或IP;
        root 站点文件路径;
        index index.php index.html;

        ssl_certificate   证书.pem文件路径;
        ssl_certificate_key  证书.key文件路径;

        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include        fastcgi_params;
        }
}

nginx + php + https 配置

原文:https://www.cnblogs.com/teemwu/p/11651336.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!