haproxy 配置https 同时技持443 80端口
确定haproxy支持https
[root@c01 sbin]# ldd haproxy |grep ssl
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f961911c000)
整合证书和私钥:
# cat 213978673141013.key 213978673141013.pem |tee server.pen
查看配置文件:
global
log 127.0.0.1 local0 info #[err warning info debug] //日志位置
tune.ssl.default-dh-param 2048 #修改默认使用2048bit加密,不设置会有警告
maxconn 4096
daemon #设置成后台运行
nbproc 1 #进程数量
pidfile /apps/haproxy-1.7.7/haproxy.pid defaults
log global
mode http #默认模式
option httplog #http日志格式
option dontlognull
retries 3 #三次失败后认为服务器不可用
option redispatch #如果cookie写入了serverId而客户端不会刷新cookie,当serverId对应的服务器挂掉后,强制定向到其他健康的服务器
maxconn 2000 #当服务器负载很高的时候,自动结束掉当前队列处理比较久的链接默认的最大连接数
contimeout 5000 #连接超时
clitimeout 30000 #客户端超时
srvtimeout 30000 #服务器超时 frontend web_in
mode http
maxconn 1000
bind *:80
bind *:443 ssl crt /etc/cert/server.pem
reqadd X-Forwarded-Proto:\ https #HTTP,HTTPS并存
#redirect scheme https if !{ ssl_fc }
acl is_a hdr_beg(host) -i ssl.espressos1.com #判断域名是不是www.espressos1.com,是则给与a服务器集群服务 use_backend a_server if is_a backend a_server
mode http #http 模式
stats uri /haproxy
balance roundrobin
cookie JSESSIONID prefix
stats hide-version
option httpclose
server web1 10.100.0.220:80 check
#server web2 128.1.2.5:80 check
haproxy 配置https 同时技持443 80端口的更多相关文章
- Jsvc安装,配置 常规用户使用tomcat的80端口
Jsvc安装 一.下载安装包,地址如下: http://commons.apache.org/proper/commonsdaemon/download_daemon.cgi 二.安装步骤,参考链接 ...
- haproxy代理https配置方法【转】
记得在之前的一篇文章中介绍了nginx反向代理https的方法,今天这里介绍下haproxy代理https的方法: haproxy代理https有两种方式:1)haproxy服务器本身提供ssl证书, ...
- nginx 反向代理 配置 https 实现http https同时存在
server { listen ssl; #监听443端口 server_name www.app01.com; ssl on; #启用ssl加密 ssl_certificate /etc/cert/ ...
- IIS7配置HTTPS+默认访问https路径
一.下载证书(这里我使用的是阿里云免费的证书) 文件说明: 1. 1532858285913.key(证书私钥文件).1532858285913.pem(证书文件).1532858285913.pfx ...
- nginx 反向代理 配置 https 实现http https同时存在 经测试 支持location 规则
server { listen ssl; #监听443端口 server_name www.app01.com; ssl on; #启用ssl加密 ssl_certificate /etc/cert/ ...
- Springcloud/Springboot项目绑定域名,使用Nginx配置Https
https://blog.csdn.net/a_squirrel/article/details/79729690 一.Https 简介(百度百科) HTTPS(全称:Hyper Text Trans ...
- Springboot项目绑定域名,使用Nginx配置Https
一.https 简介 HTTPS(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HT ...
- docker 安装 wordpress,通过nginx反向代理,绑定域名,配置https
假设docker已经安装好了,如果没有安装,可以照着 5分钟安装docker教程. 一. 下载镜像 默认下载最新版本,如果想指定对应版本,可以用冒号后加版本,像这样mysql:5.7: docker ...
- mac 80端口映射 配置
mac 80端口映射 配置 macbook 下,要绑定 80 端口的话. 一种方式是用 root 权限启动,即 sudo 启动服务进程.但 sudo 指令存在一定的安全问题,能不使用的情况下我们都尽量 ...
随机推荐
- Java微信分享接口开发
发布时间:2018-11-07 技术:springboot+maven 概述 微信JS-SDK实现自定义分享功能,分享给朋友,分享到朋友圈 详细 代码下载:http://www.demodas ...
- 自己使用过比较好用的VSCode插件
C/C++ [ms-vscode.cpptolls] 智能推导,调试和代码浏览 C/C++ Clang Command Adapter [mitaki28.vscode-clang] 使用 ...
- Uploadify in ASP.Net
和分页类似,文件上传是web开发标配的技能之一.下面介绍Uploadify的配置和使用. 一.配置 首先到Uploadify官网下载,然后在项目中添加相应引用.前台代码如下: 1.jquery.js2 ...
- 利用jquery修改href的部分字符
试了好久 就一句代码即可. $(document).ready(function(){ $('a').each(function(){ this.href = this.href.replace('y ...
- (原)ubuntnu中anaconda的g++提示crtbeginS.o:unrecognized relocation
转载请注明出处: http://www.cnblogs.com/darkknightzh/p/6950263.html 自从使用anaconda后,方便是方便了,也遇到了很多蛋疼的问题. 这次使用an ...
- perf之sched
如果你对你的进程的响应时间极其苛刻,有一天你发现你的进程响应时间变慢了,而恰好这个机器上也有其他的进程在跟你的进程争用CPU,你想看看你的进程被内核调度的情况,那么你需要用perf-sched工具. ...
- 关于jsp发起请求加载datagrid数据(草稿)
$(document).ready(function (){ var refNo = '${refNo}'; $('#caAbnDetail').datagrid('load',{ refNo:ref ...
- C语言学习笔记 (005) - 二维数组作为函数参数传递剖析
前言 很多文章不外乎告诉你下面这几种标准的形式,你如果按照它们来用,准没错: //对于一个2行13列int元素的二维数组 //函数f的形参形式 f(int daytab[2][13]) {...} / ...
- IntelliJ IDEA 最新激活码(截止到2018年10月14日)
IntelliJ IDEA 注册码: EB101IWSWD-eyJsaWNlbnNlSWQiOiJFQjEwMUlXU1dEIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYX ...
- logstash向elasticsearch写入数据,如何指定多个数据template
之前在配置从logstash写数据到elasticsearch时,指定单个数据模板没有问题,但是在配置多个数据模板时候,总是不成功,后来找了很多资料,终于找到解决办法,就是要多加一个配置项: temp ...