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
35 # Spawn given number of processes and distribute load among them,
36 # used for multi-core environments or to circumvent per-process
37 # limits like number of open file descriptors. Default is 1.
41 # Example HTTP proxy listener
44 # Bind to port 80 and 443 on all interfaces (0.0.0.0)
47 # We're proxying HTTP here...
50 # Simple HTTP round robin over two servers using the specified
51 # source ip 192.168.1.1 .
53 server server01 192.168.1.10:80 source 192.168.1.1
54 server server02 192.168.1.20:80 source 192.168.1.1
56 # Serve an internal statistics page on /stats:
60 # Enable HTTP basic auth for the statistics:
62 stats auth username:password
65 # Example SMTP proxy listener
68 # Disable this instance without commenting out the section.
71 # Bind to port 25 and 587 on localhost
72 bind 127.0.0.1:25,127.0.0.1:587
77 # Round robin load balancing over two servers on port 123 forcing
78 # the address 192.168.1.1 and port 25 as source.
80 server server01 192.168.1.10:123 source 192.168.1.1:25
81 server server02 192.168.1.20:123 source 192.168.1.1:25
84 # Special health check listener for integration with external load
86 listen local_health_check
88 # Listen on port 60000
91 # This is a health check
94 # Enable HTTP-style responses: "HTTP/1.0 200 OK"
95 # else just print "OK".