VirtualHosts ignoring their DocumentRoot and going to /var/www/html

Discussion in 'Installation/Configuration' started by httpDee, Jan 24, 2008.

  1. httpDee

    httpDee New Member

    Resolved: VirtualHosts ignoring their DocumentRoot and going to /var/www/html

    I have a new install of ISPConfig on CentOS 5.1 x86-64. The install seemed to go very cleanly, but now that it is up and running, I have run into a problem.

    I have added a couple of websites through the admin panel (which seems to be working fine). Appropriate-looking entries were made in Vhosts_ispconfig.conf and my DNS is pointing at the server correctly. Now the problem:

    When I go to one of the new sites in a web browser, I get the default Apache 2 welcome page, even though I have created an index.php in the new site's docroot (/var/www/web2/web/index.php). I noticed that it seems to think the site's docroot is /var/www/html, so I tried putting an index.html there, and sure enough, when bringing up the virtual host by name in a browser, I get the document from /var/www/html/index.html instead of the one from the virtual host's docroot.

    I don't doubt I'm missing something, but I have no idea what it might be.

    Thanks in advance.
    Last edited: Jan 24, 2008
  2. wpwood3

    wpwood3 New Member

    Are you operating behind a router?
    If so, make sure to use your internal IP in ISP Manager and your external IP in DNS Manager.
  3. httpDee

    httpDee New Member

    Server is in DMZ

    Thanks for the reply wpwood3 :)

    No, the server is in the DMZ, and this behaviour is visible from the internet. The server (and ISPConfig) is configured to use the public internet IP for everything.

    Any other ideas what might cause this?
  4. wpwood3

    wpwood3 New Member

    In the DMZ behind a router?
    I'm confused...

    Normally, when people say DMZ it means they have their router setup to forward traffic directly to one computer behind the firewall. That one computer is visible on the internet. However, the router still uses the internal IP of the computer to forward traffic. Therefore, ISPConfig must be setup as I described in my first post.
  5. Hans

    Hans Moderator ISPConfig Developer

    Also check if your Apache document root is defined as /var/www within ISPConfig under Management > Server >Settings > Web.
  6. httpDee

    httpDee New Member

    You were absolutely right. I completely misunderstood how our network here at the office is configured. The server does indeed have a non-routable IP address in addition to the (forwarded) internet IP address.

    I added the nonroutable IP in ISPConfig's server settings and switched the sites to it. Voila! It magically works. :eek:

    Thanks again :cool:

    LAKSHA Member

    I have just created a site in ispconfig and for some reason it is not showing the default page created in the folders but instead it is showing the var/www/html default page for all those domains pointing to us.
    my server ip is now my client domain is showing a different page(var/www/html default page) then rest of the created sites.which are showing page which are in their own folder system.
    please help as i am lost here.

Share This Page