Dear HAProxy Developers community:

After incorporating inputs from some of you, we tested with an updated haproxy.cfg (see below). Product-1 is still not accessible via HAProxy (see logs below). We would appreciate any insights to solve this issue.

___Haproxy.cfg file_

frontend webapps-frontend
    bind          *:80

    acl host_coscend    req.hdr(Host) coscend.com:80
    acl path_subdomain_p1 path_beg -i /Product1

    use_backend subdomain_p1-backend if host_coscend path_subdomain_p1

    default_backend webapps-backend

backend webapps-backend
[…]

    option       http-server-close
    server Product1.VM0 12.12.12.112:6012 cookie pad-p check


backend subdomain_p1-backend
            http-request set-header Host 12.12.12.112:6012
            reqirep ^([^\ :]*)\ /Product1/(.*)     \1\ /\2
            acl hdr_location res.hdr(Location) -m found
rspirep ^Location:\ (http?://12.12.12.112(:[0-9]+)?)?(/.*) Location:\ /Product1 if hdr_location
            server Product1.VM0 12.12.12.112:6012 cookie pad-p check


Info.log
Conditional backend
Sep 30 09:12:44 localhost haproxy[1691]: 192.168.100.153 - - "GET /CoscendPad HTTP/1.1" 404 262 "" "" 53639 804 "webapps-frontend" "subdomain_p1-backend" "Product1" 5 0 0 3 8 ---- 4 4 0 0 0 0 0 "" ""

Default backend:
Sep 30 09:12:44 localhost haproxy[1691]: 192.168.100.153 - - "GET /favicon.ico HTTP/1.1" 200 4603 "" "" 53639 813 "webapps-frontend" "webapps-backend" "Product1" 30 0 0 3 34 ---- 1 1 0 0 0 0 0 "" ""


Thank you.
-- --
Sincerely,

Susheel Jalali
Coscend Communications Solutions
[email protected]

Web site: www.Coscend.com
------------------------------------------------------------------
CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail Messages from Coscend Communications Solutions' posted at:
http://www.Coscend.com/Terms_and_Conditions.html


On 09/30/15 00:59, Susheel Jalali wrote:
>
> Dear HAProxy Developers,
>
> We are implementing HAProxy for reverse proxy load balancing for the first time in our LAN. We are seeking your guidance below to optimize our HAProxy configuration. Currently, we are unable to access our fully working products via HAProxy on two different servers. We would appreciate any pointers to learn from so that we could solve this HAPRoxy conditional backend issue.
>
> Issue:  "Cannot get /Product1"
>
> We have working products (Product-1, 2, 3, …) instances residing on 2 servers hosted in internal LAN. HAProxy is in DMZ. We are using the following haproxy.cfg template to configure access to our products behind HAProxy: > · Live Product-1 can be accessed directly: http://Server_IP:Port#_of_Product1 or http://Coscend.com:Port#_of_Product1
> ·         HAProxy stats on Web browser show all working products are UP.
> · But we cannot access them via HAProxy by their names, Product1, Product2, ...

> Access URL of Product 1 via HAProxy reverse proxy: http://HAProxy_Server_IP:Port#_of_HAProxy/Product1 orhttp://Coscend.com/Product1
>
> Test scenario created
> ·         Global and Default sections producing proper logs.
> ·         Product-1 is accessible via default backend of HAProxy.
> · Bypassing Local DNS issues by using server IP Address and product Port #s in haproxy.cfg. > · Frontend is working and directing us to Product-1, as seen in the logs.
> ·         Product-1 is not accessible via conditional back end.
>
> -- --
>

> frontend webapps-frontend
>     bind          *:80
>     acl host_coscend    req.hdr(Host) coscend.com:80
>     acl path_subdomain_p1 path_beg -i /Product1
>     use_backend subdomain_p1-backend if host_coscend path_subdomain_p1
>     default_backend webapps-backend
>
> backend webapps-backend
> [. . .]
>     option       http-server-close
>
> backend subdomain_p1-backend
>     http-request set-header Host 12.12.12.112:6012
>     acl hdr_location res.hdr(Location) -m found
> rspirep ^Location:\ (http?://12.12.12.112(:[0-9]+)?)?(/.*) Location:\ /Product1 if hdr_location
>     server Product1.VM0 12.12.12.112:6012 cookie pad-p check
> Thank you.
>

> Sincerely,
> --
>
> Susheel Jalali
>
>
> Coscend Communications Solutions
> Web site: www.Coscend.com
------------------------------------------------------------------
CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail Messages from Coscend Communications Solutions' posted at:
http://www.Coscend.com/Terms_and_Conditions.html


Reply via email to