lnmp服务器配置HTTPS

Posted FinnYY

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了lnmp服务器配置HTTPS相关的知识,希望对你有一定的参考价值。

server {
  server_name ktsf.weiyou18.com;
  #listen 80;
  listen 443;
  ssl on;
  ssl_certificate /usr/local/nginx/conf/vhost/cert/214819247210150.pem;
  ssl_certificate_key /usr/local/nginx/conf/vhost/cert/214819247210150.key;
  ssl_session_timeout 5m;
  ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_prefer_server_ciphers on;

  index index.php index.html index.htm;
  root /home/wwwroot/ktsf/public;
  location /nginx_status {
    stub_status on;
    access_log off;
    allow 127.0.0.1;
    deny all;
  }


  location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ {
    expires 30d;
  }

  location ~ .*.(js|css)?$ {
    expires 12h;
  }
  location / {
    if (!-e $request_filename) {
    rewrite ^(.*)$ /index.php?s=/$1 last;
    break;
    }
  }

  location ~ .php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PHP_VALUE open_basedir=/home/wwwroot/ktsf:/tmp/:/proc/;
    include fastcgi_params;
  }

  access_log /home/wwwlog/ktsf/access.log access;
  error_log /home/wwwlog/ktsf/error.log error;
}







































以上是关于lnmp服务器配置HTTPS的主要内容,如果未能解决你的问题,请参考以下文章

使用LNMP构建企业web站点

如何彻底卸载安装在lnmp环境下的ssl证书?

LNMP笔记:阿里云32位 CentOS 5.4 配置 LNMP环境

LNMP环境搭建以及配置

阿里云服务器安装配置流程

CentOS 下 LNMP 环境配置