#1  
Old 10th August 2005, 07:50
jysse jysse is offline
Member
 
Join Date: Aug 2005
Location: Laihia, Finland
Posts: 31
Thanks: 0
Thanked 3 Times in 1 Post
Default Multiple domains

I have two registered domains. First one is ok but when I select the other one on my browser it goes to first domain page. Like this:
www.firstdomain.com, works ok, only thing is that ip adrress is shown at the address field instead of normal address ?
www.seconddomain.com, goes to firstdomain homepage and also shows ip address.
How can I fix this ?
Debian 3.1 and ISPConfig and done this by adding a new site.

Thanx, Jysse

Vhosts_ispconfig.conf:

###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 192.168.1.2:80
#
#
######################################
# Vhost: www.firstdomain.com:80
######################################
#
#
<VirtualHost 192.168.1.2:80>
ServerName www.firstdomain.com:80
ServerAdmin webmaster@firstdomain.com
DocumentRoot /var/www/web1/web
ServerAlias firstdomain.com
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/web1/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 <Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web1/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web1/phptmp/ php_admin_value session.save_path /var/www/web1/phptmp/ Alias /error/ "/var/www/web1/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/web1/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3 </VirtualHost> # # # ######################################
# Vhost: www.seconddomain.com:80
######################################
#
#
<VirtualHost 192.168.1.2:80>
ServerName www.seconddomain.com:80
ServerAdmin webmaster@seconddomain.com
DocumentRoot /var/www/web2/web
ServerAlias seconddomain.com
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/web2/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 <Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web2/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web2/phptmp/ php_admin_value session.save_path /var/www/web2/phptmp/ Alias /error/ "/var/www/web2/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/web2/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3 </VirtualHost> # # #
Reply With Quote
Sponsored Links
  #2  
Old 10th August 2005, 10:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What do you enter in your browser's address bar? You must enter an address that's also in the ServerName or ServerAlias directive of the Apache vhost, so for your second vhost that would be http://www.seconddomain.com or http://seconddomain.com. If you enter anything else that points also to your server the Apache doesn't know how to handle this and gives back the first vhost it can find.
__________________
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
  #3  
Old 10th August 2005, 11:22
jysse jysse is offline
Member
 
Join Date: Aug 2005
Location: Laihia, Finland
Posts: 31
Thanks: 0
Thanked 3 Times in 1 Post
 
Default Problem continues...

Quote:
Originally Posted by falko
What do you enter in your browser's address bar? You must enter an address that's also in the ServerName or ServerAlias directive of the Apache vhost, so for your second vhost that would be http://www.seconddomain.com or http://seconddomain.com. If you enter anything else that points also to your server the Apache doesn't know how to handle this and gives back the first vhost it can find.
Thanks for your quick answer . I tried to enter address as you suggested. Same problem appears.
But I did try to investigate some more and I think that there is a problem with name resolving. "Seconddomain" points to a wrong server when I ping it. I have redirected my first domain to my server and it's ok. Did the same redirect to the second domain before. I have send a message to my service provider about this. Hope they can resolve this.

Jysse
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
Fedora Core 4 - The Perfect Setup nandhu HOWTO-Related Questions 27 10th January 2006 12:23
Multiple SSL sites on 1 server heat Server Operation 1 26th April 2005 13:05


All times are GMT +2. The time now is 21:00.


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