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 指令存在一定的安全问题,能不使用的情况下我们都尽量 ...
随机推荐
- Qt Installer Framework 使用说明(二)
目录 4.教程: 创建一个安装程序 创建软件包目录 创建配置文件 创建程序包信息文件 指定组件信息 指定安装程序版本 添加许可证 选择默认内容 创建安装程序内容 创建安装程序二进制文件 5.创建安装程 ...
- DLib库Base64编解码示例
代码 #include <iostream> #include <fstream> #include <sstream> #include <string&g ...
- Inno Setup入门(五)——添加readme文件
这个实现起来很简单,就是在[files]段中的某个预先作为readme的文件后面添加标志位isreadme: [setup] ;全局设置,本段必须 AppName=Test AppVerName=TE ...
- vmware网络模式仅主机模式linux不能ping通window
问题描述 vmware在使用仅主机模式,新建的linux虚拟机,不能ping通window本机(宿主主机).....(这不蛋疼吗...) 注意:后面的搞定后的结果 解决方案 开启家庭组的,网络发现功能 ...
- Ubuntu 10.04里安装强大抓图工具Shutter
Shutter 原名叫GScrot,是一款Linux下很强大的抓图工具,支持截取全屏幕,窗口,自选区域以及网页的图像,并且截取后的图像还可以简单编辑,Shutter还支持插件功能,矩齿,边缘化,碎纸, ...
- 无法启动程序,因为计算机丢失D3DCOMPILER_47.dll 的解决方法
这个原因应该是windows update在更新的时出现错误导致的 解决方法是安装 KB4019990 更新包. 网址如下:http://www.catalog.update.microsoft.c ...
- 基于 CoreText 实现高性能 UITableView
引起UITableView卡顿比较常见的原因有cell的层级过多.cell中有触发离屏渲染的代码(譬如:cornerRadius.maskToBounds 同时使用).像素是否对齐.是否使用UITab ...
- webpack window 使用sass来编译css样式
1.执行安装: npm install sass-loader --save-dev (此处不行的话就换上npm install node-sass) 2.稍微修改一下config,删掉我们先前添加的 ...
- GitHub Desktop 代码库管理工具
1.GitHub Desktop 简介 GitHub Desktop 是用于 GitHub 项目版本控制软件. 官网下载地址 GitHub Desktop 其它下载地址 GitHub Desktop ...
- 关于VC++的增量链接(Incremental Linking)
增量链接(Incremental Linking)这个词语在使用Visual C++时经常会遇到(其实不只是VS系列,其它链接器也有这个特性), 就比如经常遇到的:上一个增量链接没有生成它, 正在执行 ...