You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "S. Wong" <sw...@webprincess-designs.com> on 2002/04/30 05:24:25 UTC

mod_vhost_alias and NameVirtualHost question

Hello all,

I have successfully used NameVirtualHost and mod_vhost_alias separately
in two very different web servers.  Is it possible to combine both?  My
aim is this : to create certain virtual hosts that have very specific
configurations (more than the global settings that NameVirtualHost will
allow for) and more generic on-the-fly vhosts (using mod_vhost_alias).
I have only one public IP to use you see.  I was hoping to do something
like this :

<enable mod_vhost_alias>


NameVirtualHost 192.168.1.111:80

<VirtualHost 192.168.1.111:80>
  ServerName   foo.com
  DocumentRoot         /usr/www/nvhosts/foo.com
  [host specific configurations]
</VirtualHost>

<VirtualHost _default_:*>
  VirtualDocumentRoot   /usr/www/vhosts/%0
  VirtualScriptAlias    /usr/www/vhosts/%0/cgi-bin/
</VirtualHost>

Is this possible?  How can I achieve such a discriminating web instance?

Thanks. :-)

--
Ciao ?:-)
Shirlyn, the WebPrincess



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: mod_vhost_alias and NameVirtualHost question

Posted by "S. Wong" <sw...@webprincess-designs.com>.
Thanks Joshua! :-)

Joshua Slive wrote:

> S. Wong wrote:
>
> > NameVirtualHost 192.168.1.111:80
> >
> > <VirtualHost 192.168.1.111:80>
> >   ServerName   foo.com
> >   DocumentRoot         /usr/www/nvhosts/foo.com
> >   [host specific configurations]
> > </VirtualHost>
> >
> > <VirtualHost _default_:*>
> >   VirtualDocumentRoot   /usr/www/vhosts/%0
> >   VirtualScriptAlias    /usr/www/vhosts/%0/cgi-bin/
> > </VirtualHost>
>
> There is no "_default_" virtual host when you are using name virtual
> hosts.  Instead, the first listed host becomes the default.  So to get
> the configuration you want, you should switch the order of those two and
> change _default_:* to 192.168.1.111:80.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

--
Ciao ?:-)
Shirlyn, the WebPrincess



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: mod_vhost_alias and NameVirtualHost question

Posted by Joshua Slive <jo...@slive.ca>.
S. Wong wrote:

> NameVirtualHost 192.168.1.111:80
> 
> <VirtualHost 192.168.1.111:80>
>   ServerName   foo.com
>   DocumentRoot         /usr/www/nvhosts/foo.com
>   [host specific configurations]
> </VirtualHost>
> 
> <VirtualHost _default_:*>
>   VirtualDocumentRoot   /usr/www/vhosts/%0
>   VirtualScriptAlias    /usr/www/vhosts/%0/cgi-bin/
> </VirtualHost>

There is no "_default_" virtual host when you are using name virtual 
hosts.  Instead, the first listed host becomes the default.  So to get 
the configuration you want, you should switch the order of those two and 
change _default_:* to 192.168.1.111:80.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org