On Wed, 5 Mar 2003, Andrew Ho wrote:

> I want to simplify my configuration in two ways. I'd prefer not to
> maintain two sets of VirtualHost configuration data, and I'd like it if
> the block that proxies .pl files to the backend proxy not be replicated
> per VirtualHost.

With the details you provided the best advice, as others have given,
is mod_macro or making the httpd.conf from a template.  I usually do
the latter.

If you added more details, for example a sample httpd.conf for the
proxy and the backend it would be easier to help.

Do you use 2.0 for the proxy?
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypreservehost
is often helpful.

"RewriteOptions inherit" might also help simplify your configuration.

> The conceptual behavior I want, is for <FilesMatch "\.pl$"> to be proxied
> by the backend server, and everything else by the frontend. I've tried
> many combinations which don't work, which I can post if it's relevant...

Please do.  :-)

[...]
> Does anybody have a pointer to a setup that looks like this?

Maybe I am completely misunderstanding the problem, but a guess
would be something like the following in the proxy:

ProxyPreserveHost yes
RewriteRule ^/(.*\.pl) http://localhost:1234/$1 [P]

<virtualhost _default_>
  ServerName foo.example.com
  RewriteEngine  on
  RewriteOptions inherit
</virtualhost>

<virtualhost _default_>
...


 - ask

-- 
ask bjoern hansen, http://www.askbjoernhansen.com/ !try; do();

Reply via email to