确定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. Fix: Windows Script Host access is disabled on this machine

    If you receive this Windows Script Host access is disabled on this machine, Contact your administrat ...

  2. yum实现仅仅下载不安装包

    问题的产生,都是源于真实的需求... 01.yum安装切保存rpm包于本地 [root@yhs_web_1 ~]# vim /etc/yum.conf [main] cachedir=/var/cac ...

  3. 在CLion项目中指定不同版本的链接库

    在项目中, 需要使用到libevent-2.1.x, 但是Ubuntu16.04自带的libevent版本为2.0.5, 需要另外编译安装新版的libevent, 安装过程很简单 -stable.ta ...

  4. Oracle Tuxedo的配置文件配置详解

    # (c) 2003 BEA Systems, Inc. All Rights Reserved. #ident "@(#) samples/atmi/simpapp/ubbsimple $ ...

  5. 阿里员工都是这样排查Java问题的,附工具单(转)

    平时的工作中经常碰到很多疑难问题的处理,在解决问题的同时,有一些工具起到了相当大的作用,在此书写下来,一是作为笔记,可以让自己后续忘记了可快速翻阅,二是分享,希望看到此文的同学们可以拿出自己日常觉得帮 ...

  6. mysql中日志的配置与分析

    默认情况下,如果日志没有配置,则只记录错误日志,记录到syslog,配置文件 /etc/mysql/conf.d/mysqld_safe_syslog.cnf (ubuntu下) [mysqld_sa ...

  7. ios中键盘处理适合ipad 和iphone

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasShown:) name:UI ...

  8. ios中PagedFlowView的用法

    下载地址 引入PagedFlowView.h  PagedFlowView.m文件 #import <UIKit/UIKit.h> #import "PagedFlowView. ...

  9. public-private-protected-默认缺省 的区别

    public 公共,加上这个修饰的属性和方法,可以在程序的任何其它地方访问 . private 私有,和public相反,加上这个修饰的属性和方法,只允许在本类中访问. protected 保护,位于 ...

  10. Tensorflow中的name_scope和variable_scope

    Tensorflow是一个编程模型,几乎成为了一种编程语言(里面有变量.有操作......). Tensorflow编程分为两个阶段:构图阶段+运行时. Tensorflow构图阶段其实就是在对图进行 ...