确定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端口的更多相关文章

  1. Jsvc安装,配置 常规用户使用tomcat的80端口

     Jsvc安装 一.下载安装包,地址如下: http://commons.apache.org/proper/commonsdaemon/download_daemon.cgi 二.安装步骤,参考链接 ...

  2. haproxy代理https配置方法【转】

    记得在之前的一篇文章中介绍了nginx反向代理https的方法,今天这里介绍下haproxy代理https的方法: haproxy代理https有两种方式:1)haproxy服务器本身提供ssl证书, ...

  3. nginx 反向代理 配置 https 实现http https同时存在

    server { listen ssl; #监听443端口 server_name www.app01.com; ssl on; #启用ssl加密 ssl_certificate /etc/cert/ ...

  4. IIS7配置HTTPS+默认访问https路径

    一.下载证书(这里我使用的是阿里云免费的证书) 文件说明: 1. 1532858285913.key(证书私钥文件).1532858285913.pem(证书文件).1532858285913.pfx ...

  5. nginx 反向代理 配置 https 实现http https同时存在 经测试 支持location 规则

    server { listen ssl; #监听443端口 server_name www.app01.com; ssl on; #启用ssl加密 ssl_certificate /etc/cert/ ...

  6. Springcloud/Springboot项目绑定域名,使用Nginx配置Https

    https://blog.csdn.net/a_squirrel/article/details/79729690 一.Https 简介(百度百科) HTTPS(全称:Hyper Text Trans ...

  7. Springboot项目绑定域名,使用Nginx配置Https

    一.https 简介     HTTPS(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HT ...

  8. docker 安装 wordpress,通过nginx反向代理,绑定域名,配置https

    假设docker已经安装好了,如果没有安装,可以照着 5分钟安装docker教程. 一. 下载镜像 默认下载最新版本,如果想指定对应版本,可以用冒号后加版本,像这样mysql:5.7: docker ...

  9. mac 80端口映射 配置

    mac 80端口映射 配置 macbook 下,要绑定 80 端口的话. 一种方式是用 root 权限启动,即 sudo 启动服务进程.但 sudo 指令存在一定的安全问题,能不使用的情况下我们都尽量 ...

随机推荐

  1. mysql查询高级用法

    联合查询 select a.* , b.adress , b.name from a , b where a.sbNo = b.cdid order by a.sbNo , a.STime selec ...

  2. django生成文件txt、pdf(在生成 PDF 文件之前,需要安装 ReportLab 库)

    from django.http import HttpResponse def download_file(request): # Text file #response = HttpRespons ...

  3. java 封装02

    //Person.java public class Person{ private String name; private int age; private String sex; public ...

  4. fnmatch源码阅读

    源码下载地址如下: http://web.mit.edu/freebsd/csup/fnmatch.h http://web.mit.edu/freebsd/csup/fnmatch.c 代码整体不错 ...

  5. OpenWRT/LEDE长期运行记录截图

    哈哈, 发图留念. 待会儿要把它换到别处去了. 在Newifi Y1上稳定运行了95天的自编译OpenWrt, Y1这个型号的特点是5G信号强度比2.4G的强 Update 2017-11-27 在W ...

  6. [转载]Ubuntu安装配置 git 服务器和客户端

    原文地址:Ubuntu安装配置 git 服务器和客户端作者:ding404 1.配置前准备 服务器:安装ssh server另外还装了gitosis做git的权限管理 sudo apt-get ins ...

  7. memcached全面剖析--3.memcached的删除机制和发展方向

    下面是<memcached全面剖析>的第三部分. 发表日:2008/7/16 作者:前坂徹(Toru Maesaka) 原文链接:http://gihyo.jp/dev/feature/0 ...

  8. VirtualBox虚拟机增加CentOS根目录容量 LVM扩容

    对于目前的网络开发者来说,比较好的搭档就是Win7+VirtualBox+CentOS的组合,既可以发挥Linux强大的网络服务功能,也可以有效的隔离各项服务拖慢系统,影响系统的运行,对于新手来说可以 ...

  9. Linux 操作MySQL常用命令行(转)

    注意:MySQL中每个命令后都要以分号:结尾. 1.显示数据库 mysql> show databases; +----------+ | Database | +----------+ | m ...

  10. permission denied (publickey)问题的解决 和 向github添加ssh key

    使用ssh key这种方式进行clone ,pull github上面的项目,使用 git clone或者git pull origin master出现permission denied (publ ...