Virtual sites and root site

Discussion in 'General' started by tyre, Sep 25, 2009.

  1. tyre

    tyre New Member

    [SOLVED] Virtual sites and root site

    I'm sure this is something easy I missed, but am having a heck of a time figuring it out. The scenario is this:

    -- The details --
    I have ISPconfig3.0.1.4 setup on Ubuntu 9.04 and it's running great. I have my main domain (lets say registered with name servers (, etc).

    I have created sites via ispconfig and after added them to the dns manager, they are running as expected with the ISPconfig generic template. (e.g. is using name server and is being served the right domain.)

    -- The Question --
    However, my main site ( is pulling the default apache2 site (/var/www/ instead of /var/www/ displaying the "It Works!" page. Is this by design or did I miss something? It seems weird to have the vhost sites in the root of my main site...

    Additionally, if anyone would care to shed light - are my actions of adding the site to ISPconfig as well as using the dns wizard to add the DNS entries the correct way to go? Is ISPconfig supposed to do the DNS automatically, such as plesk or cpanel might? I ask so incase the two issues are related, and because finding direct into about this was difficult.

    Thank you for your time :)
    Last edited: Sep 26, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no such thing as a mian site and virtual sites in ispconfig. Just create a new website "" in ISPConfig if you want to have a website

    Not at all. Because suexec is compiled in apache statically and will work only in subfolders of /var/www

  3. tyre

    tyre New Member

    I'm sorry, I re-read my post and noticed that I failed to mention that. I tried that already, with no success. There is a folder called '' in my /var/www/ folder that isn't being used when the site is pulled up via or by IP. The default apache document is instead.

    I meant it seeming weird all the sites being in var/www when my root site was running in there, like index.html, contact.html, folder, etc.. instead of how i want it:

    I really apreciate you taking the time to help me out with this; I'm sorry for the lack of information in my prior post, I was sure I had included that in there.

    Also, for information sakes here's my settings for in ISPConfig:

    Sites | Websites
    server - in dropdown
    client - blank
    ip - *
    domain -
    quota, cgi, etc stuff
    auto-subdomain - www.
    ssl off
    active checked

    DNS Entries
    server - in dropdown
    client - blank
    zome -
    ns -
    email -
    default times
    allow zone transfers - static ip of box (nothing works without this on this particular/root domain i've noticed)
    active - yes

    Type Name Data Priority
    A 0
    MX - these are set to the google apps settings and work for this domain as expected. ([email protected] goes to google )
    NS 0
    NS 0
    Last edited: Sep 25, 2009
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The server must be empty before you install ispconfig and you may not copy any sites directly into the /var/www folder!
    You have to create the sites in ISPConfig and then add the content in the folders that ISPConfig created. Do not create any folders manually in /var/www or upload content directly to the /var/www folder.

    Instead of * you should select the IP address for the site if the site does not get displayed.
  5. tyre

    tyre New Member

    Well, the server was empty as far as it could be. The "It Works!" index.html is placed there by apache by default. I used this guide explicitly

    I created no folders and edited no content. I was using the index.html, contact.html as an example of what I don't want to have to do when goes live.

    In the IP-Address drop down box that has an asterisk, that is the only choice. (If I edit the site or create a new, it only shows an asterisk). So perhaps that's the root of my problem?

    Just to make sure i'm communicating clearly, and I apologize if i'm not doing a good job with that:

    I have a fresh jaunty install with apache2 and ispconfig3.
    I created the site and dns entries, added and pointing to my ip with my registrar and now goes to my server.
    I added additional domains, added their dns zones, and set their name servers to and via the registrar and they work as expected. (going to loads /var/www/ )
    But although I've created via ISPconfig (and can thus see the folder sitting there) the server is still serving the default apache document. Which is how it was i first installed everything and hadn't even loaded ispconfig.. just went to (ip of website).

    Thank you so much for your help and patience.
    Last edited: Sep 25, 2009
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Add all IP addresses that you want to use for websites under system > edit server ip and then select the correct IP that corresponds with the dns record of the domain in the website settings.
  7. tyre

    tyre New Member

    Thank you Till - That was the issue. is now loading the correct folder. I altered the index.html file in just to make sure and it is indeed working.

    I have one lingering issue however. I have about 4 domains setup to play around with - and so now that I have set the IP in the site setup on each of them, they work. (I edited the titles of the template page to say 'welcome to domainA' and it worked.)..

    However when I went to the IP (like it was serving the site, not the site. So I deleted and it's DNS entries (And verified there weren't any misplaced ones in and now the i'm getting an 'The requested URL / was not found on this server' error page. (just like if i go to

    It seems weird that it's defaulting to when i go to the IP - even when the site and it's DNS entries have been removed (like, i'd more likely assume it'd go to Did I miss something here?
  8. tyre

    tyre New Member

    Figured it out. Thanks you so much Till for your patience and valuable information.

    I had "Allow zone transfers to these IPs" filled in with the server IP - which was allowing it to seem like it was working before because I hadn't put the server IP into the settings. But was was happening is that all the sites that looked like they were working (the default 'Welcome to your website!' page) were actually all of the root domain, and not the sub domains. (i.e. all were routing to the zone transfer ip solely).

    So here's what I did to make it all work:

    Add the IP of the server to the "Edit Server IP" section under "System".

    Added the root site (i.e. to the "Sites" section. I made sure the server IP was selected, checked my checkboxes for cgi/php/etc and clicked SAVE.

    Then added my domain into the DNS settings. Selected the only server, whatever client if any, the zone '' (don't forget the trailing dot), ns of, email of and Allow zone transfers was blank. Made sure active is checked and clicked SAVE.

    Opened that same DNS entry on the list and clicked records. added NS records zone: nshostname: - repeated with ns2.

    This domain is hosted through godaddy, so i was sure to add the and into the host summary pointing to the server ip.

    It all works! :) Thanks again Till

Share This Page