Virtual hosts

Discussion in 'Server Operation' started by Toucan, Dec 8, 2009.

  1. Toucan

    Toucan Member

    I've been having a little trouble setting up virtual hosts in apache2. The server works and is visible from the world Through the router using port forwarding.

    I attempted to use webmin to set up two virtual hosts in addition to the default host. I've used to spare domain names I have registered and used web forwarding to point them to the static ip address of the router. This works but both show the default doc root page not their own supposed doc root pages.

    I presemed they would use their client side headers to be recognised by apache and get to the right virtual host.

    Is this likely to be a problem with just using web forwarding or is the virtual host not setup properly?

  2. topdog

    topdog Active Member

    That is a problem with your apache configuration, name based virtual hosting works by using the Host: header in the request not the ip address.
  3. Toucan

    Toucan Member

    now my name servers are working it all seems in order. thanks

Share This Page