Build a simple HTTP reverse proxy and Haproxy

Source: Internet
Author: User
Tags haproxy rsyslog

Environment preparation




We use the Yum source to install the Haproxy software here.

Yum Install Haproxy-y

    1. Configuring log levels for Haproxy

      Modify rsyslog log (vi /etc/sysconfig/rsyslog)

650) this.width=650; "src=" "title=" 70$ 4vni[755q]kem5i ' {a_n.png ' alt= "wkiol1ucrvhrrbzlaafo2dyeq-q515.jpg"/>
Modify the log level in the configuration file with the above modification (vi/etc/rsyslog.conf)

650) this.width=650; "src=" "title=" qi[ V6ZYOZMQASZ6W3@SVALL.png "alt=" Wkiom1ucrzlarslcaaixreuc3w8534.jpg "/> Start the log server Rsyslog

Service Rsyslog Restart

2. Modify the Haproxy Master profile and configure the corresponding host's link address (vi/etc/haproxy/haproxy.cfg)

650) this.width=650; "src=" "title="%4r49s E NQY$YX]T1) U6) 5.png "alt=" Wkiom1ucslwa31msaaoovk4psqw978.jpg "/>

Restart Service Haproxy Restart

3. Check the port of Haproxy

650) this.width=650; "src=" Http:// "title=" Hqns0rqn6nl00ikc[c8zy@h.png "alt=" Wkiol1uctbbt-l9haavbgo5n0fi695.jpg "/>

3. Configure the home page of Web1 and WEB2

650) this.width=650; "src=" "style=" float: none; "Title=" hgw%6jmw@[) @MRBUG5 (Y) 1r.png "alt=" Wkiol1ucuolrjv47aacc4ce8rw0102.jpg "/>

650) this.width=650; "src=" "style=" float: none; "Title=" rx[(m6c4$25ah ' L4 (01afag.png "alt=" Wkiom1ucuwcyjlzyaacjxyfo6ay303.jpg "/>

4. Test access

650) this.width=650; "src=" "style=" float: none; "title=" 3$]0n ' ce4}hv2%8p ([637uj.png "alt=" Wkiom1ucuxlak5hwaacytvhav4s582.jpg "/>

650) this.width=650; "src=" "style=" float: none; "title=" YXV6 ' 21ydfma3$ $U 73{x9jq.png "alt=" Wkiol1ucvdtw77a9aaccliqtkx4225.jpg "/>

5. Display the operating status of the Haproxy

650) this.width=650; "src=" "title=" Z5dur4 ) 1r~y3u) x1q0 ' r$ba.png "alt=" Wkiom1ucu7dykukpaahjbva_zrg727.jpg "/>

The above is the simplest configuration haproxy content

The following will add keepalived+haproxy schema content, please pay attention!!! A lot of advice!!

Build a simple HTTP reverse proxy and Haproxy

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: 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.