haproxy配置https-创新互联
今天测试配置haproxy代理https,一直报错,后来发现,后端已经是https这里则不需要特别指定了
成都创新互联专注于海宁网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供海宁营销型网站建设,海宁网站制作、海宁网页设计、海宁网站官网定制、小程序设计服务,打造海宁网络公司原创品牌,更为您提供海宁网站排名全网营销落地服务。配置文件如下:
global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user haproxy group haproxy daemon stats socket /var/lib/haproxy/stats defaults mode http log global option httplog option dontlognull option http-server-close option forwardfor except 127.0.0.0/8 option redispatch retries 3 timeout http-request 10s timeout queue 1m timeout connect 10s timeout client 1m timeout server 1m timeout http-keep-alive 10s timeout check 10s maxconn 3000 frontend h6_f bind *:80 mode http log global use_backend h6_server frontend h6_w bind *:443 mode tcp log global use_backend h6_four backend h6_four mode tcp balance roundrobin server h6_f1 10.29.25.11:443 weight 1 maxconn 10000 check inter 10s server h6_f2 10.30.20.9:443 weight 1 maxconn 10000 check inter 10s backend h6_server mode http balance roundrobin server h6_one 10.29.25.11:80 weight 1 maxconn 10000 check inter 10s server h6_tow 10.30.20.9:80 weight 1 maxconn 10000 check inter 10s
如果后端没有配置https则需要
global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user haproxy group haproxy daemon stats socket /var/lib/haproxy/stats defaults mode http log global option httplog option dontlognull option http-server-close option forwardfor except 127.0.0.0/8 option redispatch retries 3 timeout http-request 10s timeout queue 1m timeout connect 10s timeout client 1m timeout server 1m timeout http-keep-alive 10s timeout check 10s maxconn 3000 frontend h6_f bind *:80 mode http log global use_backend h6_server frontend h6_w bind *:443 ssl crt /etc/haproxy/ckl.pem mode http log global use_backend h6_four backend h6_four mode http balance roundrobin server h6_f1 10.29.25.11:443 weight 1 maxconn 10000 check inter 10s server h6_f2 10.30.20.9:443 weight 1 maxconn 10000 check inter 10s backend h6_server mode http balance roundrobin server h6_one 10.29.25.11:80 weight 1 maxconn 10000 check inter 10s server h6_tow 10.30.20.9:80 weight 1 maxconn 10000 check inter 10s
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享题目:haproxy配置https-创新互联
分享链接:http://myzitong.com/article/dsohcd.html