Nginx 配置https 开启ssl 同时支持http
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的更多相关文章
- [nginx][tls] nginx配置https与ssl/tls的sni的方法
一 https的sni配置方法 http { } server { listen 443 ssl; server_nam ...
- 【转】Linux下nginx配置https协议访问的方法
一.配置nginx支持https协议访问,需要在编译安装nginx的时候添加相应的模块--with-http_ssl_module 查看nginx编译参数:/usr/local/nginx/sbin/ ...
- nginx配置https双向验证(ca机构证书+自签证书)
nginx配置https双向验证 服务端验证(ca机构证书) 客户端验证(服务器自签证书) 本文用的阿里云签发的免费证书实验,下载nginx安装ssl,文件夹有两个文件 这两个文件用于做服务器http ...
- nginx配置https及Android客户端访问自签名证书
前一篇随笔通过keytool生成keystore并为tomcat配置https,这篇随笔记录如何给nginx配置https.如果nginx已配置https,则tomcat就不需要再配置https了.通 ...
- Nginx 配置 HTTPS 服务器
Nginx 配置 HTTPS 服务器 Chrome 浏览器地址栏标志着 HTTPS 的绿色小锁头从心理层面上可以给用户专业安全的心理暗示,本文简单总结一下如何在 Nginx 配置 HTTPS 服务器, ...
- nginx 配置https没有ssl_module以及一些错误
一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 1 nginx: [emerg] the "ssl" parameter requ ...
- nginx 配置https并自签名证书
2016-10-28 转载请注明出处:http://daodaoliang.com/ 作者: daodaoliang 版本: V1.0.1 邮箱: daodaoliang@yeah.net 参考链接: ...
- [记录]NGINX配置HTTPS性能优化方案一则
NGINX配置HTTPS性能优化方案一则: 1)HSTS的合理使用 2)会话恢复的合理使用 3)Ocsp stapling的合理使用 4)TLS协议的合理配置 5)False Start的合理使用 6 ...
- 购买https证书以及nginx配置https
文章来源 运维公会:购买https证书以及nginx配置https 1.https的作用 https的全名是安全超文本传输协议,是在http的基础上增加了ssl加密协议.在信息传输的过程中,信息有可能 ...
随机推荐
- dhclient命令
语法:dhclient(选项)(参数) 选项0:指定dhcp客户但监听的端口号-d:总是以前台方式运行程序-q:安静模式,不打印任何错误的提示信息-r:释放ip地址 参数:网络接口:操作的网络接口 示 ...
- pycharm 开发连接linux 服务器
这样就可以了.....
- 当数据库中的字段与javabean中对应的属性名不同
当数据库中的字段与javabean中对应的属性名不同时: 在查询语句中对不同的字段起别名,例如: 数据库中的字段名为last_name , javabean中为lastName则:select las ...
- Win10设置vs2010总是以管理员身份运行
有的项目用vs打开后直接运行总是要求提升权限,如下图 1.第一步(这样的方式只能是先运行vs,然后再打开项目,这样才是以管理员的身份运行的.但是如果是通过sln文件的快捷方式打开的,却不是 ...
- 11.boolean类型
/* 关于java中的Boolean类型: 1)赋给boolean类型的值只有两个:ture或者false 2)boolean类型的数据主要用在逻辑运算和条件控制语句中.*/ public class ...
- android 怎么实现跑马灯效果
自定义控件 FocusedTextView, 使android系统误以为它拥有焦点 public class FocusedTextView extends TextView { public Foc ...
- EasyUI 下载与引用
1.官网下载地址: http://www.jeasyui.com/download/index.php 一般下载 “GPL Edition” (开源版本). 2.目录结构: demo:案例,可以删 l ...
- html+css构成的框架,可自行改造
运行效果 代码下载地址:http://pan.baidu.com/s/1eSeBh2E
- web.xml报错Cannot resolve class 'StrutsPrepareAndExecuteFilter' (idea创建SSH项目)
原因: xwork-core.jar包已经合并到struts2-core.jar下,并且点开jar包,发现没有 org.apache.struts2.dispatcher.ng.filter.Stru ...
- 洛谷1303 A*B Problem 解题报告
洛谷1303 A*B Problem 本题地址:http://www.luogu.org/problem/show?pid=1303 题目描述 求两数的积. 输入输出格式 输入格式: 两个数 输出格式 ...