https://bz.apache.org/bugzilla/show_bug.cgi?id=58120

            Bug ID: 58120
           Summary: ProxyPassInherit does not work as expect
           Product: Apache httpd-2
           Version: 2.4.12
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
          Assignee: [email protected]
          Reporter: [email protected]

http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypassinherit

It says the directive will cause the current server/vhost to "inherit"
ProxyPass directives defined in the main server. My testing results show that
no matter I 
set ProxyPassInherit On or ProxyPassInherit Off, the virtual host always
inherits the ProxyPass defined in the main server.

I checked the code, it seems when ProxyPassInherit is set to Off , HTTP server
does not merge the config of ProxyRemote(ps->proxies) from global, not the 
ProxyPass(ps->aliases) as I thought.

static void * merge_proxy_config(apr_pool_t *p, void *basev, void *overridesv)
{
    proxy_server_conf *ps = apr_pcalloc(p, sizeof(proxy_server_conf));
    proxy_server_conf *base = (proxy_server_conf *) basev;
    proxy_server_conf *overrides = (proxy_server_conf *) overridesv;


    ps->ppinherit = (overrides->ppinherit_set == 0) ? base->ppinherit :
overrides->ppinherit;
    ps->ppinherit_set = overrides->ppinherit_set || base->ppinherit_set;

    if (ps->ppinherit) {
        ps->proxies = apr_array_append(p, base->proxies, overrides->proxies);  
    }
    else {
        ps->proxies = overrides->proxies;
    }


    ps->aliases = apr_array_append(p, base->aliases, overrides->aliases);      



    ... ...


    return ps;
}

Is this a bug ? or I misunderstood the usage of this directive ?

Thanks !

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to