configure 'default' vhost? ie, if someone hits an unconfigured domain or just the IP

Discussion in 'Installation/Configuration' started by syadnom, Feb 8, 2019.

  1. syadnom

    syadnom New Member

    How do I configure a vhost to be displayed when someone types in the IP of the server *or* hits a domain that has the server's IP but isn't yet configured as a vhost?

    Right now, it seems to deliver the first alphabetical vhost but I don't know if that's why it serves that up or if it's just coincidence.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Are you using ISPConfig?
    Create website 0000aaaa.com, and put there suitable index.html to explain the situation. The 0000aaaa.com domain does not need to exist in DNS.
     
    ahrasis likes this.
  3. syadnom

    syadnom New Member

    is 0000aaaa.com significant or just the 'absolute' first alphabetical site?
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is is the latter.
     
    ahrasis likes this.
  5. syadnom

    syadnom New Member

    ok, fixed up. I added an index.html to /var/www/html/ and to /var/www/0000aaaa.com/web/ to redirect and now it's catching direct IP and unconfigured domains. Thanks!
     

Share This Page