lnmp配置https,配置pathinfo---------记录学习

环境 lnmp一键安装包php

ssl证书->腾讯云申请html

1.下载ssl证书segmentfault

2.根据证书安装指引安装session

https://cloud.tencent.com/document/product/400/4143dom

server {
        listen 443;
        server_name www.domain.com; #填写绑定证书的域名
        ssl on;
        ssl_certificate 1_www.domain.com_bundle.crt;
        ssl_certificate_key 2_www.domain.com.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置
        ssl_prefer_server_ciphers on;
        location / {
            root   html; #站点目录
            index  index.html index.htm;
        }
    }php-fpm

附上我本身源码:3d

配置pathinfoserver

1处须要开放端口443htm

2处修改成本身域名blog

3处修改成本身ssl证书路径,参考文档

4处引入pathinfo文件

5配置fastcgi_pass

参考文档 https://segmentfault.com/q/1010000004854045

修改php.ini  cgi.fix_pathinfo=1

查看php-fpm.conf配置文件,查看fastcg监听

有些是127.0.0.1:9000,则须要开启9000端口

个人是php-cgi.sock,因此按照5配置

3.配置http字段转https

有时候文档里说的都很详细,只是本身看的不仔细

 

 

结束~

语言表达的不太清楚,多见谅哈

相关文章
相关标签/搜索