I was thinking it would be easier to add a new command 'rproxy' &
rproxyrev which only could live in the location directive.
and to deprecate the proxypass & proxypassreverse commands.


Index: mod_proxy.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.c,v
retrieving revision 1.46
diff -u -r1.46 mod_proxy.c
--- mod_proxy.c 2001/05/23 03:39:39 1.46
+++ mod_proxy.c 2001/06/19 18:31:44
@@ -503,7 +503,22 @@
     return NULL;
 }

+
 static const char *
+    add_pass_loc(cmd_parms *cmd, void *dummy, const char *remote )
+{
+    server_rec *s = cmd->server;
+    proxy_server_conf *conf =
+    (proxy_server_conf *) ap_get_module_config(s->module_config,
&proxy_module);
+    struct proxy_alias *new;
+
+    new = apr_array_push(conf->aliases);
+    new->fake = cmd->path;
+    new->real = remote;
+    return NULL;
+}
+
+static const char *
     add_pass_reverse(cmd_parms *cmd, void *dummy, const char *f, const
char *r)
 {
     server_rec *s = cmd->server;
@@ -519,6 +534,20 @@
 }

 static const char *
+    add_pass_reverse_loc(cmd_parms *cmd, void *dummy, const char
*remote)
+{
+    server_rec *s = cmd->server;
+    proxy_server_conf *conf;
+    struct proxy_alias *new;
+
+    conf = (proxy_server_conf *)ap_get_module_config(s->module_config,
+                                                  &proxy_module);
+    new = apr_array_push(conf->raliases);
+    new->fake = cmd->path;
+    new->real = remote;
+    return NULL;
+}
+static const char *
     set_proxy_exclude(cmd_parms *parms, void *dummy, const char *arg)
 {
     server_rec *s = parms->server;
@@ -727,6 +756,10 @@
      "A list of ports which CONNECT may connect to"),
     AP_INIT_TAKE1("ProxyVia", set_via_opt, NULL, RSRC_CONF,
      "Configure Via: proxy header header to one of: on | off | block |
full"),
+    AP_INIT_TAKE1("RProxy", add_pass_loc, NULL, ACCESS_CONF,
+     "a virtual path and a URL for use in a Location Directive"),
+    AP_INIT_TAKE1("RProxyReverse", add_pass_reverse_loc, NULL,
ACCESS_CONF,
+     "a virtual path and a URL for reverse proxy behaviour in a
location Directive"),
     {NULL}
 };


On 17 Jun 2001 08:09:25 -0400, Chuck Murcko wrote:
> This seems more flexible. Can it be done so as not to break ProxyPass 
> not wrapped in a <location>? Is this not possible using mod_rewrite?
> 
> On Thursday, June 14, 2001, at 12:29 PM, Ian Holsman wrote:
> 
> >
> > Hi.
> > I was looking at this feature request,
> > and was wondering if we should change the proxypass command
> > to something like a 'Location' where can set multiple options
> >
> > or if we should possibly make the ProxyPass sit in the location
> > it is r-proxying
> >
> > eg.
> > <location /foo>
> >     ProxyPass  http://www.foo_bar/
> > </location>
> >
> > That way we could add other settings for the paritcular r-proxy
> > like different Timeouts for different r-proxies
> >
> > and we could make it easier for other people to customize r-proxy later
> > on (on a individual basis)
> >
> > ..Ian
> > From: Rolf Fokkens <[EMAIL PROTECTED]>
> > Date: Wed Jun 13, 2001  02:49:59 PM US/Eastern
> > To: [EMAIL PROTECTED]
> > Subject: mod_proxy/7864: ProxyPass needs another argument
> > Reply-To: [EMAIL PROTECTED]
> >
> >
> >> Number:         7864
> >> Category:       mod_proxy
> >> Synopsis:       ProxyPass needs another argument
> >> Confidential:   no
> >> Severity:       non-critical
> >> Priority:       medium
> >> Responsible:    apache
> >> State:          open
> >> Quarter:
> >> Keywords:
> >> Date-Required:
> >> Class:          change-request
> >> Submitter-Id:   apache
> >> Arrival-Date:   Wed Jun 13 12:00:03 PDT 2001
> >> Closed-Date:
> >> Last-Modified:
> >> Originator:     [EMAIL PROTECTED]
> >> Release:        1.3.12
> >> Organization:
> > apache
> >> Environment:
> > RedHat Linux 6.2, kernel 2.2.19
> >> Description:
> > We use an apache server in front of some other web servers, mostly for 
> > logging
> > in a uniform way. We use proxypass te pass on requests to the other web 
> > servers.
> > This assumes however that the other server has a different name than 
> > the apache
> > server:
> > <VirtualHost ..>
> >     ServerName front.server.dom
> >     ProxyPass / http://back.server.dom/
> > </VirtualHost>
> >
> > For some purposes it would be convenient to do:
> >
> > <VirtualHost ...>
> >     ServerName front.server.dom
> >     ProxyPass / http://front.server.dom/ back.server.dom
> > </VirtualHost>
> >
> > This would allow the back.server.dom machine to have front.server.dom 
> > as a
> > virtual host as well.
> >> How-To-Repeat:
> >
> >> Fix:
> > Please, add the suggested optional host parameter.
> >> Release-Note:
> >> Audit-Trail:
> >> Unformatted:
> >  [In order for any reply to be added to the PR database, you need]
> >  [to include <[EMAIL PROTECTED]> in the Cc line and make sure the]
> >  [subject line starts with the report component and number, with ]
> >  [or without any 'Re:' prefixes (such as "general/1098:" or      ]
> >  ["Re: general/1098:").  If the subject doesn't match this       ]
> >  [pattern, your message will be misfiled and ignored.  The       ]
> >  ["apbugs" address is not added to the Cc line of messages from  ]
> >  [the database automatically because of the potential for mail   ]
> >  [loops.  If you do not include this Cc, your reply may be ig-   ]
> >  [nored unless you are responding to an explicit request from a  ]
> >  [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
> >
> >
> 
> Chuck Murcko
> Topsail Group
> http://www.topsail.org/


Reply via email to