One more comment on the "defunct vhost" setup. You have to be very careful if you decide to define each of your virtual hosts in their own distinct definition file, and include them all with a wildcard Include directive, such as "Include vhost.*"
I think that the order that the files are included is alphabetical. Whatever it is, the order can easily be changed by introducing new files, which might not get included where you expect in the sequence. More importantly, the vhost which is first (default) may change unexpectedly. This is what happened to us. I have a webpage on our server which displays the effective httpd.conf with all of the "include"s expanded out. I recently added a case-sensitive alphabetical sort on filename when an include directive references multiple files, so that's what my research identified a few months ago. On 13 January 2012 16:29, Tom Evans <[email protected]> wrote: > On Fri, Jan 13, 2012 at 4:13 PM, Clay Porter <[email protected]> > wrote: > > Thanks for the info. I will try what you suggested. > > > > I'm pretty new to all of this, so I hope you don't mind a n00b > > question. What do you mean by a "defunct vhost"? Could I trouble you > > for an example? > > > > Thanks again. > > > > Clay > > > > He means a vhost is not used for serving the sites you want to serve, > and only serves when a request is received that doesn't match one of > your real vhosts, which Apache by default will serve from the first > applicable vhost listed in the configuration. > > Eg if you have this configuration: > > NameVirtualHost *:80 > > <VirtualHost *:80> > ServerName foo > </VirtualHost> > > <VirtualHost *:80> > ServerName bar > </VirtualHost> > > and a request comes in on port 80 with server name 'wibble', then none > of these vhosts match, and Apache will serve from the first listed > vhost, in this case the 'foo' vhost. > > If the configuration was like this: > > NameVirtualHost *:80 > > <VirtualHost *:80> > DocumentRoot /var/empty > </VirtualHost> > > <VirtualHost *:80> > ServerName foo > </VirtualHost> > > <VirtualHost *:80> > ServerName bar > </VirtualHost> > > then a request for the host 'wibble' would be served from the first > unnamed vhost. This helps make it clear that a request was correctly > routed to the right vhost, and didn't just get there because the vhost > was the first listed and hence default. > > Cheers > > Tom > > --------------------------------------------------------------------- > 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: [email protected] > " from the digest: [email protected] > For additional commands, e-mail: [email protected] > > -- Steve Swift http://www.swiftys.org.uk
