Haproxy configuring ACLs to handle different URL requests

Source: Internet
Author: User
Tags haproxy

  1. Requirements Description
    Server Description:
    HAProxy server:192.168.1.90
    web1:192.168.1.103
    web2:192.168.1.105
    Domain:tecadmin.net
    When the user accesses the: Tecadmin.net/blog link, it only jumps to the WEB2 (192.168.1.105) server.
    All other accesses will be redirected to the WEB1 or WEB2 server based on the weights.
  2. Configuration file
    Global Log127.0.0.1local0 Notice Maxconn50000daemondefaults Log global mode HTTP option httplog option Dontlognull contimeout120000Clitimeout120000Srvtimeout120000option forwardfor option HTTP-server-close# Configuration forhttp Sitefrontend http-inchBind192.168.1.90: theACL Is_blog Url_beg/Blog Use_backend tecadmin_blogifis_blog default_backend tecadmin_websitebackend tecadmin_blog mode http Balance Roundrobin # Load balancing Algorithm option httpchk option forwardfor Server WEB2192.168.1.105: theWeight1Maxconn +checkbackend tecadmin_website mode http Balance roundrobin # Load balancing algorithm option Httpchk opt Ion Forwardfor Server WEB1192.168.1.103: theWeight1Maxconn +Check server WEB2192.168.1.105: theWeight1Maxconn +Check
    Haproxy Code
  3. Reference Link: http://tecadmin.net/haproxy-acl-for-load-balancing-on-url-request/

Haproxy configuring ACLs to handle different URL requests

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.