Haproxy, configure for one host

Posted by Michal K. on Server Fault See other posts from Server Fault or by Michal K.
Published on 2012-10-23T16:43:57Z Indexed on 2012/10/23 17:04 UTC
Read the original article Hit count: 157

Filed under:
|
|
|

I have to use haproxy on one machine. I want to do redirect requests from Ip to the same ip (with another port).

My configuration (doesn't work):

lobal
maxconn 4096 # Total Max Connections. This is dependent on ulimit
daemon
nbproc 1 # Number of processing cores. Dual Dual-core Opteron is 4 cores for example.
defaults
mode http

clitimeout 600000000
srvtimeout 600000000
contimeout 400000000
        log             127.0.0.1       local0
        log             127.0.0.1       local1 notice
option httpclose # Disable Keepalive

listen http_proxy 127.0.0.1:8080
balance leastconn # Load Balancing algorithm
acl acl_apache path_end .avi .jpeg
#option httpchk
option forwardfor # This sets X-Forwarded-For
## Define your servers to balance
server DE2 127.0.0.1:8080 weight 1 maxconn 15 check

© Server Fault or respective owner

Related posts about apache2

Related posts about debian