#1  
Old 27th November 2005, 19:40
Scouser Scouser is offline
Junior Member
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with Vhosts (I think)

Ok I have successfully installed ISPconfig & have a website (www.site1.com) running. I only have 1 IP address and use ZoneEdit for my DNS. This is all fine but when I try to add another site (www.site2.com) to ISPconfig it just points to the first site in the vhosts_ispconfig.conf (www.site1.com). Any advice would be welcome as I don't seem to be able to find anything on these forums addressing this problem so I am assuming it's just me.
Reply With Quote
Sponsored Links
  #2  
Old 27th November 2005, 20:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,814
Thanks: 821
Thanked 5,340 Times in 4,189 Posts
Default

Have you added www.site2.com as new site or as Co-Domain? What do you mean with "just points to the first site in the vhosts_ispconfig.conf"? Please post the content of vhosts_ispconfig.conf here.
Reply With Quote
  #3  
Old 28th November 2005, 19:59
Scouser Scouser is offline
Junior Member
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
Have you added www.site2.com as new site or as Co-Domain?
I have added www.site2.com as a new site.

Quote:
Originally Posted by till
What do you mean with "just points to the first site in the vhosts_ispconfig.conf"?
If I try to access www.site2.com through a browser the home page for www.site1.co.uk is displayed.

I have inserted both URLs into my hosts file on my windows machine and can access both that way but from another machine (outside my lan) all I can access is www.site1.co.uk

Quote:
Originally Posted by till
Please post the content of vhosts_ispconfig.conf here.
Done
Quote:
###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 192.168.2.100:80
NameVirtualHost 192.168.2.102:80
#
#
######################################
# Vhost: www.site1.co.uk:80
######################################
#
#
<VirtualHost 192.168.2.100:80>
SuexecUserGroup web13_webmaster web13
ServerName www.site1.co.uk:80
ServerAdmin webmaster@site1.co.uk
DocumentRoot /var/www/web13/web
ServerAlias site1.co.uk
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
ScriptAlias /cgi-bin/ /var/www/web13/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web13/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 Off
Alias /error/ "/var/www/web13/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/web13/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web13/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.site2.com:80
######################################
#
#
<VirtualHost 192.168.2.102:80>
SuexecUserGroup web12_webmaster web12
ServerName www.site2.com:80
ServerAdmin webmaster@site2.com
DocumentRoot /var/www/web12/web
ServerAlias site2.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
ScriptAlias /cgi-bin/ /var/www/web12/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web12/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 Off
Alias /error/ "/var/www/web12/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/web12/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web12/user/$1/web/$3
</VirtualHost>
#
#
#
Reply With Quote
  #4  
Old 28th November 2005, 20:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,814
Thanks: 821
Thanked 5,340 Times in 4,189 Posts
Default

Do you have a router with 2 external IP addresses where the ports are forwarded to your 2 internal IP addresses (192.168.2.100 + 192.168.2.102)?
Reply With Quote
  #5  
Old 28th November 2005, 22:04
Scouser Scouser is offline
Junior Member
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, I only have one IP external address. 192.168.2.102 is an extra IP address mapped to eth0:0.
Reply With Quote
  #6  
Old 29th November 2005, 10:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,814
Thanks: 821
Thanked 5,340 Times in 4,189 Posts
Default

But the server has 2 IP addresses:

NameVirtualHost 192.168.2.100:80
NameVirtualHost 192.168.2.102:80

And the website on the IP: 192.168.2.100 works. So you must have two IP addresses on your server.

You posted above that you have problems with exeternal access. So you dont have an router and an external IP on that router?
Reply With Quote
  #7  
Old 29th November 2005, 19:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

I think the problem is that you forward port 80 from your router to 192.168.2.100, but www.mysite2.com is on 192.168.2.102. That's why you always see your first site. It would be different if www.mysite2.com also ran on 192.168.0.100.
__________________
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
  #8  
Old 29th November 2005, 20:14
Scouser Scouser is offline
Junior Member
 
Join Date: Oct 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
I think the problem is that you forward port 80 from your router to 192.168.2.100, but www.mysite2.com is on 192.168.2.102. That's why you always see your first site. It would be different if www.mysite2.com also ran on 192.168.0.100.
Yes you are correct. The second IP address (102) was put in to try and alleviate the original problem. I have now changed it back to 192.168.2.100 and again www.site1.co.uk works but www.site2.com now displays:-
Code:
Index of /

Icon  Name                    Last modified      Size  Description
[DIR] apache2-default/        04-Oct-2005 07:40    -   
[DIR] web12/                  29-Nov-2005 18:48    -   
[DIR] web13/                  24-Nov-2005 18:44    -   
[DIR] webalizer/              04-Nov-2005 07:35    -   
[DIR] www.site2.com/          29-Nov-2005 18:48    -   
[DIR] www.site1.co.uk/        24-Nov-2005 18:44    -   

Apache/2.0.54 (Ubuntu) PHP/4.4.0-3 mod_ssl/2.0.54 OpenSSL/0.9.7g Server at www.site2.com Port 80
Now I am back to square one & don't know where to go next.
Reply With Quote
  #9  
Old 30th November 2005, 00:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
 
Default

Do you maybe have www.site2.com somewhere in your main httpd.conf or in sites-enabled?
__________________
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
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
Problem with https and IE on Mac os and safari DarkBen Installation/Configuration 11 29th September 2006 17:45
Problem with UebiMiau sodapop General 4 25th November 2005 09:51
ISPConfig pop3 problem mphayesuk General 21 31st October 2005 10:53
Problem with webmail MyLinux General 10 17th September 2005 14:31
Installation problem: PHP problem? hgoor Installation/Configuration 7 21st August 2005 22:15


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


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