Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st June 2010, 20:29
jtullous jtullous is offline
Junior Member
 
Join Date: Jun 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default multiple site with sub domains issues

Ok I got sub domain website to work but having an issue with no subdomain websites showing up at as subdomain websites.

for example:

one domain named example.com it has 2 websites:

www.example.com and sub.example.com

when looking up the site that works completely fine. But if you do a look up on just:

http://example.com it pulls up the http://sub.example.com site.

What is even more odd is there is 2 more site that are setup as:

www.example2.com and www.example3.com which are 2 other domains also.

If you do a lookup with out the www if front of the domain address you get the sub.example.com site.

Each site does have the Auto-Subdomain set to none. And each domain just has the an A record to www and IP.

I have also noticed that when you do not use the www but just the example.com as it does pull up the site and domain that is sub.example.com it seems to be masking the site with it own domain.

Any suggestions?

What the out come should be is that it should shows a 404 page that its not found. Not another website on another domain.

Last edited by jtullous; 21st June 2010 at 20:35.
Reply With Quote
Sponsored Links
  #2  
Old 21st June 2010, 22:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,036
Thanks: 841
Thanked 5,655 Times in 4,464 Posts
Default

Quote:
Each site does have the Auto-Subdomain set to none.
And thats the problem. You missed to enable auto subdomain www for the site example.com that shall be also www.example.com
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 21st June 2010, 23:29
jtullous jtullous is offline
Junior Member
 
Join Date: Jun 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks ok that seemed to work. No more redirect to the sub.example.com site.

But one other thing since I have enabled the auto-subdomain, when someone hits the example.com it doesnt redirect to the www.example.com its just a 404 which is ok but if I wanted http://example.com redirect to http://www.example.com where do i set that up and how?
Reply With Quote
  #4  
Old 22nd June 2010, 00:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,036
Thanks: 841
Thanked 5,655 Times in 4,464 Posts
Default

You create a website example.com where you enable auto subdomain www and not a website www.example.com. you do not enable any kind of redirects.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 22nd June 2010, 00:27
jtullous jtullous is offline
Junior Member
 
Join Date: Jun 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Understand,

If an A record of www is set will that confused the auto sub domain of www?

Or do they play hand in hand?

They way it is setup atm is:

dns:
Arecords
www -> ip
sub -> ip

Website is setup as:

example.com with auto-sub domain set to www.


Now when searching for http://example.com you get search engine result looking for the site.

If you type www.example you get the page. My understanding is that if the auto-sub domain is set to www the resquest of example.com should pull up www.example.com correct?

The site doesnt answer to example.com but will answer to a www.example.com

Maybe I am just confused on the records since this is new field I have taken on.
Reply With Quote
  #6  
Old 22nd June 2010, 00:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,036
Thanks: 841
Thanked 5,655 Times in 4,464 Posts
Default

You mix up the website and dns here. Your problem is not related to the site settings, you missed is to add a dns A-Record for example.com pointing to the IP address of the server. How shall your webbrowser know which server to contact if there is no dns record for it?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 22nd June 2010, 03:41
jtullous jtullous is offline
Junior Member
 
Join Date: Jun 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

Ahh the infamous wildcard. Thank you.

I did do the following and added:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www
RewriteRule (.*) http://www.%{HTTP_HOST}$1 [L,R]

Only on the sites I wanted the www to show.

So far so good.
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
Centos 5.4 ispconfig 3 host multiple domains vuphan Server Operation 0 4th May 2010 20:15
Multiple Domains (with SSL), one site? AlArenal General 5 3rd August 2009 13:43
Exim Gateway with mailwatch (Unable to receive emails) siul0_0 HOWTO-Related Questions 10 9th May 2009 00:00
ISPconfig to host multiple domains in one IP with multiple DynDns addresses agelospanagiotakis Installation/Configuration 23 2nd April 2008 12:10
Issues with FTP and accessing site Ganther General 7 11th December 2007 23:56


All times are GMT +2. The time now is 09:17.


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