global
log 127.0.0.1 local0 emerg #[emerg alert crit err warning notice info debug]
pidfile /run/haproxy.pid
ulimit-n 51200
maxconn 8000
user haproxy
group haproxy
#daemon
defaults
log global
option redispatch
retries 2
timeout connect 5s
timeout client 5m
timeout server 5m
#timeout check 5s
maxconn 8000
frontend https_proxy
mode tcp
bind :443
option tcplog
log global
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
acl www req_ssl_sni -i haiyun.me
acl www req_ssl_sni -i www.haiyun.me
#use_backend www if { req.ssl_sni -i haiyun.me }
use_backend www if www
backend www
server web1 127.0.0.1:1443 send-proxy
配置rsyslog将log保存到文件:
# Collect log with UDP
$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514
# Creating separate log files based on the severity
local0.* /var/log/haproxy.log
#local0.notice /var/log/haproxy.log
标签:none