1 # Example configuration file for HAProxy 1.3, refer to the url below for
2 # a full documentation and examples for configuration:
3 # http://haproxy.1wt.eu/download/1.3/doc/configuration.txt
9 # Log events to a remote syslog server at given address using the
10 # specified facility and verbosity level. Multiple log options
12 #log 10.0.0.1 daemon info
14 # Specifiy the maximum number of allowed connections.
17 # Raise the ulimit for the maximum allowed number of open socket
18 # descriptors per process. This is usually at least twice the
19 # number of allowed connections (maxconn * 2 + nb_servers + 1) .
22 # Drop privileges (setuid, setgid), default is "root" on OpenWrt.
26 # Perform chroot into the specified directory.
27 #chroot /var/run/haproxy/
29 # Daemonize on startup
36 # Spawn given number of processes and distribute load among them,
37 # used for multi-core environments or to circumvent per-process
38 # limits like number of open file descriptors. Default is 1.
42 # Example HTTP proxy listener
45 # Bind to port 81 and 444 on all interfaces (0.0.0.0)
48 # We're proxying HTTP here...
51 # Simple HTTP round robin over two servers using the specified
52 # source ip 192.168.1.1 .
54 server server01 192.168.1.10:80 source 192.168.1.1
55 server server02 192.168.1.20:80 source 192.168.1.1
57 # Serve an internal statistics page on /stats:
61 # Enable HTTP basic auth for the statistics:
63 stats auth username:password
66 # Example SMTP proxy listener
69 # Disable this instance without commenting out the section.
72 # Bind to port 26 and 588 on localhost
73 bind 127.0.0.1:26,127.0.0.1:588
78 # Round robin load balancing over two servers on port 123 forcing
79 # the address 192.168.1.1 and port 25 as source.
81 #use next line for transparent proxy, so the servers can see the
82 #original ip-address and remove source keyword in server definition
83 #source 0.0.0.0 usesrc clientip
84 server server01 192.168.1.10:123 source 192.168.1.1:25
85 server server02 192.168.1.20:123 source 192.168.1.1:25
88 # Special health check listener for integration with external load
90 listen local_health_check
92 # Listen on port 60000
95 # This is a health check
98 # Enable HTTP-style responses: "HTTP/1.0 200 OK"
99 # else just print "OK".