Is it possible to have a "default virtual" host?

This is a discussion on Is it possible to have a "default virtual" host? within the Linux Web Servers forums, part of the Web Server and Related Forums category; I'd like to set up a "Default Virtual Host" that will apply to all IP's on ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-16-2005
listrecv@gmail.com
 
Posts: n/a
Default Is it possible to have a "default virtual" host?

I'd like to set up a "Default Virtual Host" that will apply to all IP's
on a certain port, *except* for IP's with explicit virtual hosts.

EG:

<VirtualHost 10.1.1.1:8080>
....
</VirtualHost>

<VirtualHost 10.1.1.2:8080>
....
</VirtualHost>

<VirtualHost 10.1.1.3:8080>
....
</VirtualHost>

<VirtualHost _default_:8080>
# This should take all other IP's, like 10.1.1.4, 10.1.1.5, etc.
....
</VirtualHost>

I can't seem to get this to work. Is it possible? (This is different
from one nonvirtual host, and many virtual hosts - since they are
listening on different ports, I want them to all be virtual - the main
site on port 80 is different then the one on 8080.)

Any apache experts capable of solving this one?

  #2 (permalink)  
Old 09-20-2005
listrecv@gmail.com
 
Posts: n/a
Default Re: Is it possible to have a "default virtual" host?

Anyone? Any ideas?

Or, if this is Just Not Possible, please let me know.

listr...@gmail.com wrote:
> I'd like to set up a "Default Virtual Host" that will apply to all IP's
> on a certain port, *except* for IP's with explicit virtual hosts.
>
> EG:
>
> <VirtualHost 10.1.1.1:8080>
> ...
> </VirtualHost>
>
> <VirtualHost 10.1.1.2:8080>
> ...
> </VirtualHost>
>
> <VirtualHost 10.1.1.3:8080>
> ...
> </VirtualHost>
>
> <VirtualHost _default_:8080>
> # This should take all other IP's, like 10.1.1.4, 10.1.1.5, etc.
> ...
> </VirtualHost>
>
> I can't seem to get this to work. Is it possible? (This is different
> from one nonvirtual host, and many virtual hosts - since they are
> listening on different ports, I want them to all be virtual - the main
> site on port 80 is different then the one on 8080.)
>
> Any apache experts capable of solving this one?


  #3 (permalink)  
Old 09-29-2005
Kenneth Svee
 
Posts: n/a
Default Re: Is it possible to have a "default virtual" host?

[ nobody ]

> listr...@gmail.com wrote:
>> I'd like to set up a "Default Virtual Host" that will apply to all IP's
>> on a certain port, *except* for IP's with explicit virtual hosts.

[ listr...@gmail.com wrote ]
> Anyone? Any ideas?


If you define put your "default virtualhost" outside a VirtualHost
directive, then those settings should be defaulted to whenever a
request is not handled by one of the virtualhosts, i.e.:

#--- Default settings:
ServerName xyz.domain.com
ServerAlias xyz
ServerAdmin ...

<Directory "/path/to/default/htdocs">
...Options, Order, Allow...
</Directory>


#--- Virtualhosts:
<VirtualHost 10.1.1.1:8080>
...
</VirtualHost>
....


--
~ksvee

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:11 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0