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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th October 2008, 17:17
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default Strange Redirect of the Co-Domains

Hi Folks,

I have a strange problem with dozen of co-domains associated to a main domain called mywebsite.com

Some of these domains seem to work and they redirect the user to mywebsite.com the main domain.

Other domains seems to redirect at 244.232.22.112 that is the main shared IP domain server.

If the co-domain are called with the www.mywebsite.ext works and the user will be redirects to www.mywebsite.com. If I call the domain with simply mywebsite.ext the user will be redirects to the main shared IP.

This is the code of the Vhosts_ispconfig.conf file at /etc/httpd/conf/vhosts

Code:
<VirtualHost 244.232.22.112:80>
ServerName www.mywebsite.com:80
ServerAdmin webmaster@mywebsite.it
DocumentRoot /var/www/web45/web
ServerAlias *.mywebsite.com *.mywebsite.net *.mywebsite.info .... 
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ErrorLog /var/www/web45/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
Alias /error/ "/var/www/web45/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web45/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web45/user/$1/web/$3
</VirtualHost>

I need to redirect all the domains, maintaining the domain name written in the url bar, in the main domain.
Have I to create two co-domain: *.mywebsite.net and mywebsite.net

Thanks





Have you any idea about this problem?

Regards

Last edited by vaio1; 15th October 2008 at 17:43.
Reply With Quote
Sponsored Links
  #2  
Old 16th October 2008, 12:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Make sure that all domains point with DNS A-Record to the IP of the website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 16th October 2008, 12:47
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Hi Till,

the DNS-Records are OK.

Tell me if I wrong to say that the co-domains must have two for each extension in the ISPConfig Co-Domains panel.

Code:
www.mywebsite.com   <--- Main domain
    mywebsite.net   <--- this domain must be redirect the user to mywebsite.com and maintain the name of the domain .net in the url bar
BUT
What happens if the user type these following url?
- mywebsite.net
- www.mywebsite.net
- foo.mywebsite.net


Using these links, you will be routed under the primary domain?

thanks

Last edited by vaio1; 16th October 2008 at 12:49.
Reply With Quote
  #4  
Old 16th October 2008, 14:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

You must create a Co-Domain for each subdomain you want to use for this web site. If the user types in a subdomain for which you did not create a Co-Domain and for which you did not create a web site of its own, he will get the Shared IP page.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 16th October 2008, 14:50
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Ok so the final question is:
Exists a way to redirect all the subdomains in a main domain name?

thanks
Reply With Quote
  #6  
Old 17th October 2008, 13:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

You can use the Apache Directives field in ISPConfig in fill in something like
Code:
ServerAlias *.mywebsite.com
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 17th October 2008, 13:47
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

ok and if the user type only the domain name without subdomain?

thanks
Reply With Quote
  #8  
Old 18th October 2008, 16:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

For this ISPConfig automatically creates a Co-Domain without subdomain.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 18th October 2008, 18:59
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

My steps:

1. I have created the site and assign the first domain name mywebsite.com
2. In the co-domains I can see mywebsite.com
3. Now, I need to add another domain. I push on the new button
4. In the field "Domain" I write mywebsite.net and I push on the save button
5. Now I have to create a jolly domain. I push another time on the new button.
6. In the field "Domain" I have to write *.mywebsite.net and I push on the save button

these are my steps. Are they correct?

thanks
Reply With Quote
  #10  
Old 19th October 2008, 13:35
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
 
Default

Yes, or you use the Apache Directives field.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
mturillo (19th October 2008)
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
Strange email problem for one of my domains... any help appreciated paulrobert_a Installation/Configuration 5 9th August 2010 14:15
Web Hosting Only For Individual Domains bails Installation/Configuration 2 19th August 2008 16:35
Domains limit not enforced for resellers? mrvanes General 3 3rd January 2008 11:07
different counting of domains torusturtle Feature Requests 7 9th May 2007 22:18
Is there a Script to add Multiple Domains (websites) to ISPCONFIG??? bpmee Programming/Scripts 2 23rd February 2007 01:33


All times are GMT +2. The time now is 06:35.


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