Bug 54965 - Allow ProxyPassMatch in Directory context
Summary: Allow ProxyPassMatch in Directory context
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.4
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-14 10:35 UTC by phpfpm1
Modified: 2018-04-25 00:48 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description phpfpm1 2013-05-14 10:35:32 UTC
It would be nice is ProxyPassMatch could be allowed in Directory context. It is already noted that it works there, but it does not (http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassmatch):
ProxyPassMatch cannot occur within <Directory> section

If we edit mod_proxy.c and allow ProxyPassMatch to be in Directory context (change "err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES);"), then the error is:
Starting httpd: AH00526: Syntax error on line 53 of /usr/local/directadmin/data/users/senger11742/httpd.conf:
ProxyPass URL must be absolute!

Thank you.
Comment 1 Mike Rumph 2013-05-21 00:57:28 UTC
This appears to be a duplicate of bug 54616.

*** This bug has been marked as a duplicate of bug 54616 ***
Comment 2 phpfpm1 2013-05-21 21:32:15 UTC
It was recommended to "open an enhancement ticket in bugzilla" by Eric Covener, that was done, because bug 54616 is just a report that documented feature does not work, Eric changed documentation of Apache 2.4 (but not other versions) and marked #54616 as fixed, however, this is a request for enhancement.
Comment 3 phpfpm1 2013-08-04 14:16:46 UTC
Are there any news about the feature? http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypassmatch stills shows:
Context:	server config, virtual host, directory

"directory" should be removed from the list for now.
Comment 4 Jim Jagielski 2013-12-09 18:08:13 UTC
Can you provide exactly how you edited:

   err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES);

and the config section where you use ProxyPass in your /usr/local/directadmin/data/users/senger11742/httpd.conf file.
Comment 5 Jim Jagielski 2013-12-09 18:24:45 UTC
FWIW, even w/ the 2.2.x doccos, the entry for ProxyPass clearly states:

   This directive is not supported in <Directory> or <Files> sections.
Comment 6 phpfpm1 2013-12-21 11:26:47 UTC
I just tried to remove "NOT_IN_DIRECTORY|" from the statement. Docs have been modified after the issue was reported. However, I don't see any real usage of mod_proxy_fcgi+UDS in shared hosting environments without the ability to use ProxyPassMatch and RewriteRules for UDS in <Directory>. If it is really encouraged users to use mod_proxy_fcgi instead of mod_fastcgi, the basic features should be offered at least.
Comment 7 Jesse Glick 2018-04-25 00:48:41 UTC
I guess this is the cause of the error message

    ProxyPassMatch cannot occur within <If> section

?