Dear Bryan and HAProxy Developers:

As requested, here is the complete haproxy config content.

The relevant error logs are below:

-- --

global
    log         127.0.0.1 local2
    log-tag     haproxy
    chroot      /var/haproxy/lib
    pidfile      /var/run/haproxy.pid
    user         haproxy
    group       haproxy
    nbproc      1
    maxconn       256
    spread-checks  5
    daemon
    stats socket  /var/haproxy/stats

defaults
    mode        http
    log         global
    option      httplog
    option      dontlognull
    option      forwardfor
    option      abortonclose
    option      http-server-close
    option      redispatch
    retries     3
    timeout queue           86400
    timeout client          86400
    timeout server          86400
    timeout connect         86400
    timeout http-keep-alive  30
    timeout http-request      10
    timeout check             20
    maxconn                 50000

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


admin.log
Sep 30 12:42:29 localhost haproxy[1691]: Proxy webapps-frontend started.
Sep 30 12:42:29 localhost haproxy[1691]: Proxy webapps-frontend started.
Sep 30 12:42:29 localhost haproxy[1691]: Proxy webapps-backend started.
Sep 30 12:42:29 localhost haproxy[1691]: Proxy webapps-backend started.
Sep 30 12:42:29 localhost haproxy[1691]: Proxy subdomain_p1-backend started.
Sep 30 12:42:29 localhost haproxy[1691]: Proxy HAProxy-stats started.
Sep 30 12:47:29 localhost haproxy[5690]: Stopping frontend webapps-frontend in 0 ms. Sep 30 12:47:29 localhost haproxy[5690]: Stopping frontend webapps-frontend in 0 ms. Sep 30 12:47:29 localhost haproxy[5690]: Stopping backend webapps-backend in 0 ms. Sep 30 12:47:29 localhost haproxy[5690]: Stopping backend webapps-backend in 0 ms. Sep 30 12:47:29 localhost haproxy[5690]: Stopping backend subdomain_p1-backend in 0 ms. Sep 30 12:47:29 localhost haproxy[5690]: Stopping proxy HAProxy-stats in 0 ms. Sep 30 12:47:29 localhost haproxy[5690]: Proxy webapps-frontend stopped (FE: 4 conns, BE: 0 conns). Sep 30 12:47:29 localhost haproxy[5690]: Proxy webapps-frontend stopped (FE: 4 conns, BE: 0 conns). Sep 30 12:47:29 localhost haproxy[5690]: Proxy webapps-backend stopped (FE: 0 conns, BE: 1 conns). Sep 30 12:47:29 localhost haproxy[5690]: Proxy webapps-backend stopped (FE: 0 conns, BE: 1 conns). Sep 30 12:47:29 localhost haproxy[5690]: Proxy subdomain_p1-backend stopped (FE: 0 conns, BE: 1 conns). Sep 30 12:47:29 localhost haproxy[5690]: Proxy HAProxy-stats stopped (FE: 26 conns, BE: 12 conns).

Info.log
Conditional backend
Sep 30 12:47:29 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 12:47:29 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 "" ""


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 10/01/15 01:21, Bryan Talbot wrote:
On Wed, Sep 30, 2015 at 12:37 PM, Susheel Jalali <[email protected] <mailto:[email protected]>> wrote:

    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


Without the complete haproxy config and some logs, it was impossible for anyone to understand what issues you might be having. The question was just too vague.


    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 "" ""


From the logs shown it looks like your "conditional" backend is returning a 404, but since the log format is not standard; without the haproxy config we can only guess at what the log contents mean.

-Bryan

No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2015.0.6140 / Virus Database: 4419/10732 - Release Date: 09/30/15




Reply via email to