LPM: mod_perl and virtual hosts on Apache
rbowen at rcbowen.com
Tue Apr 10 12:09:35 CDT 2001
Gregg Casillo wrote:
> I have an installation of Apache and mod_perl running two virtual hosts
> for two domains. Let's call them foo.com and bar.com. I write and
> configure a script that I want to print something out for the location
> "/test." I want this script to run only for "foo.com/test" and not
> "bar.com/test". Currently, both virtual hosts can run the script. Is
> there a way to restrict a mod_perl script from running on all my virtual
> hosts, and if so how?
Put the <Location> section inside the <VirtualHost> container, and it
will be limited to just that VirtualHost.
If you're already doing that, then I'd say this is a bug. What version
of Apache are you running?
By the way, with Apache 2.0, you will be able to do really cool stuff
like have one Apache child process handling each vhosts - they will be
multithreaded processes - and you'll be able to specify which modules
each child will be running. Should be pretty cool. I'm running it on my
laptop, but have not had time to play with things like that yet.
Rich Bowen <rbowen at rcbowen.com>
Have trouble remembering things? - http://idforgetmyhead.com/
More information about the Lexington-pm