Automatic holding page for any sites pointing to my IP
I have loads of domains all pointing to my servers IP but because they are just holding domains I haven't configured them in WHM / Apache. Therefore they just get "can't display website" messages when visited.
Is it possible to set up rule (or whatever! (Virtual Host?)) that will point a开发者_如何学运维ny domains not configured on my server (but pointed to it) to a generic holding page?
I was thinking I could use a VirtualHost like this:
<VirtualHost 123.123.123.123:80>
DocumentRoot /www/path/to/holding/account/
ServerName *
</VirtualHost>
Hope that makes sense! Thanks
Just omit the ServerName
directive.
From my /etc/apache2/sites-enabled/000-default
- note that only the DocumentRoot directive is needed:
<VirtualHost *:80>
DocumentRoot /var/www/default
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
精彩评论