server {
listen ;
listen 443 ssl;
server_name default; index index.html index.php;
root /www/html;
access_log /var/log/nginx/pay.access.log main buffer=32k;
rewrite_log on; more_set_headers 'Server: $server_name';
more_set_headers -s '400 403 404 405 413 414 500 502 503 504' 'Server: $hostname'; # 此处为ssl 配置
ssl_certificate /usr/local/nginx/cert/test.com.crt; # *.crt文件路径
ssl_certificate_key /usr/local/nginx/cert/test.com.key; # *.key文件路径
ssl_session_cache shared:SSL:128m;
ssl_session_timeout 10m; location ~ \.php$ {
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
} location = /favicon.ico {
log_not_found off;
access_log off;
}
}

Nginx 配置https 开启ssl 同时支持http的更多相关文章

  1. [nginx][tls] nginx配置https与ssl/tls的sni的方法

    一 https的sni配置方法 http {       }       server {               listen 443 ssl;               server_nam ...

  2. 【转】Linux下nginx配置https协议访问的方法

    一.配置nginx支持https协议访问,需要在编译安装nginx的时候添加相应的模块--with-http_ssl_module 查看nginx编译参数:/usr/local/nginx/sbin/ ...

  3. nginx配置https双向验证(ca机构证书+自签证书)

    nginx配置https双向验证 服务端验证(ca机构证书) 客户端验证(服务器自签证书) 本文用的阿里云签发的免费证书实验,下载nginx安装ssl,文件夹有两个文件 这两个文件用于做服务器http ...

  4. nginx配置https及Android客户端访问自签名证书

    前一篇随笔通过keytool生成keystore并为tomcat配置https,这篇随笔记录如何给nginx配置https.如果nginx已配置https,则tomcat就不需要再配置https了.通 ...

  5. Nginx 配置 HTTPS 服务器

    Nginx 配置 HTTPS 服务器 Chrome 浏览器地址栏标志着 HTTPS 的绿色小锁头从心理层面上可以给用户专业安全的心理暗示,本文简单总结一下如何在 Nginx 配置 HTTPS 服务器, ...

  6. nginx 配置https没有ssl_module以及一些错误

    一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 1 nginx: [emerg] the "ssl" parameter requ ...

  7. nginx 配置https并自签名证书

    2016-10-28 转载请注明出处:http://daodaoliang.com/ 作者: daodaoliang 版本: V1.0.1 邮箱: daodaoliang@yeah.net 参考链接: ...

  8. [记录]NGINX配置HTTPS性能优化方案一则

    NGINX配置HTTPS性能优化方案一则: 1)HSTS的合理使用 2)会话恢复的合理使用 3)Ocsp stapling的合理使用 4)TLS协议的合理配置 5)False Start的合理使用 6 ...

  9. 购买https证书以及nginx配置https

    文章来源 运维公会:购买https证书以及nginx配置https 1.https的作用 https的全名是安全超文本传输协议,是在http的基础上增加了ssl加密协议.在信息传输的过程中,信息有可能 ...

随机推荐

  1. jQuery ajax序列化函数

    参数序列化$.param() 举例: <!DOCTYPE html> <html> <head> <script src="https://ajax ...

  2. 值域线段树 (玲珑OJ 1117)

    点击打开题目链接 题目意思很简单: 1.插入x 2.把小于x的数变成x 3.把大于x的数变成x 4.求集合中第x小数 5.求集合中小于x的数个数 思路: 线段树,节点是值的分数,你可以离散,也可以不离 ...

  3. Failed to import pydot

    在使用keras进行模型绘制的时候,出现了一个错误 Failed to import pydot. You must install pydot and graphviz for `pydotprin ...

  4. 安装asterisk以及asterisk-gui

           asterisk的安装在ubuntu上自我感觉还是很方便的,虽然也会遇到一些小的问题.下面是本人遇到的   一些问题和解决方法.     1>在ubuntu10.04上安装aste ...

  5. Spring 事务管理高级应用难点剖析: 第 1 部分

    Spring 的事务管理是被使用得最多的功能之一,虽然 Spring 事务管理已经帮助程序员将要做的事情减到了最小.但在实际开发中,如果使用不当,依然会造成数据连接泄漏等问题.本系列以实际应用中所碰到 ...

  6. Product it again

    题意:求解 $$\prod_{1 \leq i \leq n} \prod_{1 \leq j \leq m} {(i,j)}$$ 解法: 满脑子的反演 考虑对于第一个质数 $p$ 的贡献为 $p^{ ...

  7. Game of Peace

    Time Limit: 4000ms, Special Time Limit:10000ms, Memory Limit:65536KB Total submit users: 20, Accepte ...

  8. Hibernate使用Query进行查询

    错误结果如下 Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: new ...

  9. lua基本语法

    1.注释--  ;  --[[    ]] 2.控制语句: if ..then ..   elseif..  then..  else.. end while.. do..end repeat ..u ...

  10. C#基础:通过委托给任何对象数组进行排序

    在日常编写程序的时候,我们需要对一些对象进行排序,比如对int数组进行排序,自定义类数组进行排序,首先我们先讨论对数组进行排序,我们应该对冒泡排序比较熟悉,下面是数组用冒泡排序的方法 for (int ...