Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th September 2009, 04:37
tyre tyre is offline
Junior Member
 
Join Date: Sep 2009
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default [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 domain.com) registered with name servers (ns1.domain.com, 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. domainA.com is using name server ns1.domain.com and is being served the right domain.)

-- The Question --
However, my main site (domain.com) is pulling the default apache2 site (/var/www/ instead of /var/www/domain.com/web/) 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 by tyre; 26th September 2009 at 03:50.
Reply With Quote
Sponsored Links
  #2  
Old 25th September 2009, 10:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,213 Times in 4,088 Posts
Default

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

Quote:
It seems weird to have the vhost sites in the root of my main site...
Not at all. Because suexec is compiled in apache statically and will work only in subfolders of /var/www

Quote:
Is ISPconfig supposed to do the DNS automatically
No.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th September 2009, 11:45
tyre tyre is offline
Junior Member
 
Join Date: Sep 2009
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

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 'domain.com' in my /var/www/ folder that isn't being used when the site is pulled up via domain.com 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, domain2.com folder, etc.. instead of how i want it:
/var/www/domain.com/www/
/var/www/domainA.com/www/

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 domain.com in ISPConfig:

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

DNS Entries
server - domain.com in dropdown
client - blank
zome - domain.com.
ns - ns1.domain.com.
email - mail.domain.com.
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 domain.com. 1.2.3.4 0
MX - these are set to the google apps settings and work for this domain as expected. (emailname@domain.com goes to google )
NS domain.com. ns1.domain.com. 0
NS domain.com. ns2.domain.com. 0

Last edited by tyre; 25th September 2009 at 11:49.
Reply With Quote
  #4  
Old 25th September 2009, 11:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,213 Times in 4,088 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 25th September 2009, 12:12
tyre tyre is offline
Junior Member
 
Join Date: Sep 2009
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

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 http://www.howtoforge.com/perfect-se...04-ispconfig-3.

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 domain.com 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 domain.com site and domain.com dns entries, added ns1.domain.com and ns2.domain.com pointing to my ip with my registrar and now domain.com goes to my server.
I added additional domains, added their dns zones, and set their name servers to ns1.domain.com and ns2.domain.com via the registrar and they work as expected. (going to domainA.com loads /var/www/domainA.com/www/index.html )
But although I've created domain.com 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 http://1.2.3.4/ (ip of website).

Thank you so much for your help and patience.

Last edited by tyre; 25th September 2009 at 12:15.
Reply With Quote
  #6  
Old 25th September 2009, 12:17
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,213 Times in 4,088 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 25th September 2009, 12:46
tyre tyre is offline
Junior Member
 
Join Date: Sep 2009
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thank you Till - That was the issue. domain.com is now loading the correct folder. I altered the index.html file in domain.com/web 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 http://1.2.3.4) it was serving the domainA.com site, not the domain.com site. So I deleted domainA.com and it's DNS entries (And verified there weren't any misplaced ones in domain.com) and now the i'm getting an 'The requested URL / was not found on this server' error page. (just like if i go to domainA.com).

It seems weird that it's defaulting to domainA.com 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 domainB.com). Did I miss something here?
Reply With Quote
  #8  
Old 26th September 2009, 03:50
tyre tyre is offline
Junior Member
 
Join Date: Sep 2009
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

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. domain.com) 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 'domain.com.' (don't forget the trailing dot), ns of ns1.domain.com., email of mail.domain.com 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: domain.com. nshostname: ns1.domain.com. - repeated with ns2.

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

It all works! Thanks again Till
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server load / top results unsichtbare Server Operation 6 8th January 2008 17:42
Segmentation fault errors after BIND editing wxman Installation/Configuration 10 8th December 2007 20:35
Apache - Virtual hosts - ISPConfig Hans Server Operation 8 23rd April 2006 16:29
ProFTP & SuSe 10 latcarf Server Operation 26 28th March 2006 03:23
Everything owned by root !!! wwparrish Installation/Configuration 6 7th February 2006 21:25


All times are GMT +2. The time now is 20:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.