You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bird Lei <bi...@hkquest.com> on 2001/05/08 06:57:28 UTC

vhost and mod_perl

I use vhost_alias_module to set up subdomains for different users.

-- at my httpd.conf
VirtualDocumentRoot /home/%-4/web

And use Apache::Registry to run the *.cgi script.
I got problem with the following situation

Script 1: /home/user1/web/index.cgi
Address: http://user1.level3.level2.com

Script 2: /home/user2/web/index.cgi
Address: http://user2.level3.level2.com

Sometimes the scripts got mixed up.  When accessing 
http://user1.level3.level2.com, the server gives me the script 
/home/user2/web/index.cgi instead.

Was my setting a problem?  How can I have the script print out the 
package's name in which it is running?

Thanks,
Bird.


Re: vhost and mod_perl

Posted by Bird Lei <bi...@hkquest.com>.
I added $Apache::Registry::NameWithVirtualHost = 1; to my startup script, 
but the server still runs the wrong script.

My startup.pl looks like this:
-----
#!/usr/bin/perl
use Apache::Registry;
$Apache::Registry::NameWithVirtualHost = 1;
-----

Any ideas?

Bird


At 10:13 PM 2001/5/7 -0700, ___cliff rayman___ wrote:
>check out this section in the guide:
>http://thingy.kcilink.com/modperlguide/config/A_Script_From_One_Virtual_Host_C.html
>
>Bird Lei wrote:
>
> > I use vhost_alias_module to set up subdomains for different users.
> >
> > -- at my httpd.conf
> > VirtualDocumentRoot /home/%-4/web
> >
> > And use Apache::Registry to run the *.cgi script.
> >
> > Script 1: /home/user1/web/index.cgi
> >
> > Script 2: /home/user2/web/index.cgi
> >
> >
> > Sometimes the scripts got mixed up.  When accessing
> > http://user1.level3.level2.com, the server gives me the script
> > /home/user2/web/index.cgi instead.
> >
>
>--
>___cliff rayman___cliff@genwax.com___http://www.genwax.com/


Re: vhost and mod_perl

Posted by ___cliff rayman___ <cl...@genwax.com>.
check out this section in the guide:
http://thingy.kcilink.com/modperlguide/config/A_Script_From_One_Virtual_Host_C.html

Bird Lei wrote:

> I use vhost_alias_module to set up subdomains for different users.
>
> -- at my httpd.conf
> VirtualDocumentRoot /home/%-4/web
>
> And use Apache::Registry to run the *.cgi script.
>
> Script 1: /home/user1/web/index.cgi
>
> Script 2: /home/user2/web/index.cgi
>
>
> Sometimes the scripts got mixed up.  When accessing
> http://user1.level3.level2.com, the server gives me the script
> /home/user2/web/index.cgi instead.
>

--
___cliff rayman___cliff@genwax.com___http://www.genwax.com/