Summary: | Allow ProxySet to be used inside <If> expr. | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Raphaël Droz <raphael.droz> |
Component: | mod_proxy | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | 2.5-HEAD | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Raphaël Droz
2018-05-31 13:20:27 UTC
Hi Raphaël, the <If> blocks are evaluated for each request, meanwhile the Proxy sections are evaluated when httpd parses the config and creates the workers/proxy-conn-pools. I believe that despite ProxySet being available in a Directory context (so ok to have it inside an <If>) it gets evaluated once when parsed, hence the 2s timeout. The https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyset seems wrong since in "Context" I can only see "directory", probably need to be fixed. Hope that helps, Luca Just tried to fix it adding server and vhost contexts to the available list. Actually <Proxy> is one of the directory contexts, where ProxySet is allowed. But I agree that it's not quite right to document "directory" like this (it's certainly not allowed in a <If>), and ACCESS_CONF is even wider. The proxy context exists now though since r1740967 (including in 2.4.x), maybe we could use it for documenting several Proxy* directives, and probably turn some ACCESS_CONF to PROXY_CONF in the corresponding AP_INIT_ declarations? (In reply to Yann Ylavic from comment #3) > The proxy context exists now though since r1740967 (including in 2.4.x) I meant r1740998 (r1740967 is more its usage in docs). (In reply to Yann Ylavic from comment #3) > The proxy context exists now though since r1740967 (including in 2.4.x), > maybe we could use it for documenting several Proxy* directives, and > probably turn some ACCESS_CONF to PROXY_CONF in the corresponding AP_INIT_ > declarations? I think it would be great for trunk, may we break anything though for 2.4.x users? Interesting comment in set_proxy_param: /* XXX: Should this be NOT_IN_DIRECTORY|NOT_IN_FILES? */ const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS); |