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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? |
|
|||
|
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? |
|
|||
|
[ 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 |