VirtualHost Directive

Discussion in 'Apache' started by The Reckoning, Apr 3, 2007.

  1. #1
    Hey everyone, I'm having problems with Virtual Hosts.
    Let's say I have a fresh installation of Apache, and I want to allow it to accept all domains that have the correct name servers.

    Say I have the name servers on www.example.com set to ns1.myserver.com and ns2.myserver.com.
    I want myserver.com's Apache to automatically allow www.example.com to be pointed to /home/web/.
    I want it to be universal, so if I set the name servers on more domains, they all goto /home/web/.

    Any ideas? Thanks!
     
    The Reckoning, Apr 3, 2007 IP
  2. maonnie

    maonnie Member

    Messages:
    71
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Try this:
    <VirtualHost [your-ip-here]:80>
    ...
    </VirtualHost>
    
    Code (markup):
    You can also use _default_ in place of [your-ip-here]
     
    maonnie, Apr 4, 2007 IP