Haproxy Proxy web

Source: Internet
Author: User
Tags haproxy

haproxy+keepalive:192.168.1.1, 192.168.1.2

Web services: 192.168.1.3, 192.168.1.4

Install Haproxy:

#yum Install Pcre-devel zlib-devel-y

#tar-ZXVF haproxy-1.4.24.tar.gz-c/usr/src/

#cd/usr/src/haproxy-1.4.24/

#make target=linux26 Prefix=/usr/local/haproxy

#make Install Prefix=/usr/local/haproxy

#mkdir/etc/haproxy

#cp/usr/src/haproxy-1.4.24/examples/haproxy.cfg/etc/haproxy/

#vim/etc/haproxy/haproxy.cfg

Defaults
Log Global
Mode http
Option Httplog
Option Dontlognull
Retries 3
# Redispatch (note here)
Maxconn 2000
Contimeout 5000
Clitimeout 50000
Srvtimeout 50000

Listen stats
Mode http
bind:6677
Stats enable
Stats Hide-version
Stats Uri/haproxyadmin?stats
Stats Realm Haproxy\ Statistics
Stats Auth Admin:admin
Stats Admin If TRUE

Listen Webcluster 0.0.0.0:80
Option Httpchk get/index.html
Balance Roundrobin
Server Inst1 192.168.1.3:80 check Inter fall 3
Server Inst2 192.168.1.4:80 check Inter fall 3

#mkdir/usr/share/haproxy

#ln-S/usr/local/haproxy/sbin/*/usr/sbin/

#cp/usr/src/haproxy-1.4.24/examples/haproxy.init/etc/init.d/haproxy

#chmod +x/etc/init.d/haproxy

#/etc/init.d/haproxy start

#chkconfig--add Haproxy

#chkconfig Haproxy on

In Client Access 1.1, the Web page that appears is 1.3 or 1.4!!!!! Agent success

This article is from the "12325584" blog, please be sure to keep this source http://12335584.blog.51cto.com/12325584/1905628

Haproxy Proxy web

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.