开发者

Automatic holding page for any sites pointing to my IP

开发者 https://www.devze.com 2023-03-08 10:19 出处:网络
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

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号