haproxy 配置https
今天测试配置haproxy代理https,一直报错,后来发现,后端已经是https这里则不需要特别指定了
配置文件如下:
globallog127.0.0.1local2chroot/var/lib/haproxypidfile/var/run/haproxy.pidmaxconn4000userhaproxygrouphaproxydaemonstatssocket/var/lib/haproxy/statsdefaultsmodehttplogglobaloptionhttplogoptiondontlognulloptionhttp-server-closeoptionforwardforexcept127.0.0.0/8optionredispatchretries3timeouthttp-request10stimeoutqueue1mtimeoutconnect10stimeoutclient1mtimeoutserver1mtimeouthttp-keep-alive10stimeoutcheck10smaxconn3000frontendh6_fbind*:80modehttplogglobaluse_backendh6_serverfrontendh6_wbind*:443modetcplogglobaluse_backendh6_fourbackendh6_fourmodetcpbalanceroundrobinserverh6_f110.29.25.11:443weight1maxconn10000checkinter10sserverh6_f210.30.20.9:443weight1maxconn10000checkinter10sbackendh6_servermodehttpbalanceroundrobinserverh6_one10.29.25.11:80weight1maxconn10000checkinter10sserverh6_tow10.30.20.9:80weight1maxconn10000checkinter10s
如果后端没有配置https则需要
globallog127.0.0.1local2chroot/var/lib/haproxypidfile/var/run/haproxy.pidmaxconn4000userhaproxygrouphaproxydaemonstatssocket/var/lib/haproxy/statsdefaultsmodehttplogglobaloptionhttplogoptiondontlognulloptionhttp-server-closeoptionforwardforexcept127.0.0.0/8optionredispatchretries3timeouthttp-request10stimeoutqueue1mtimeoutconnect10stimeoutclient1mtimeoutserver1mtimeouthttp-keep-alive10stimeoutcheck10smaxconn3000frontendh6_fbind*:80modehttplogglobaluse_backendh6_serverfrontendh6_wbind*:443sslcrt/etc/haproxy/ckl.pemmodehttplogglobaluse_backendh6_fourbackendh6_fourmodehttpbalanceroundrobinserverh6_f110.29.25.11:443weight1maxconn10000checkinter10sserverh6_f210.30.20.9:443weight1maxconn10000checkinter10sbackendh6_servermodehttpbalanceroundrobinserverh6_one10.29.25.11:80weight1maxconn10000checkinter10sserverh6_tow10.30.20.9:80weight1maxconn10000checkinter10s
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。