Is there any better way of setting the default apache virtual host other than it just picking the first config it finds?
I have a server with many domains, of which only some are configured with httpd but the default virtual host severed up is for example is aaa.com where as really I would like it to default to mmm.com instead?
Something like parking domains without going through the hassle of setting up a config for each one – then I can serve a “content this domain has not been created yet” page?
Cheers
You can create a default virtual host and name it something like
000-defaultso that it loads first and is used unless another vhost matching the requested domain is found. Here’s the bare-bones000-default:Then you can setup a PHP file under
/var/wwwto create a domain parking page (this is a very simplified example):