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 11th May 2007, 21:40
Ashaman074 Ashaman074 is offline
Junior Member
 
Join Date: May 2007
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Default Virtual Hosts not working properly

I am having some problems and hopefully someone here can help shed some light on them.

This is the second linux/apache server I have set up. The first one was several years ago; but at the time I hosted a website and virtual sites using the process outlined here:http://www.onlamp.com/pub/a/apache/2...24/vhosts.html which worked fine.

I now have a new server running Ubuntu (Edgy) & Apache. When I read about ISPconfig, I thought it would provide a simple and easy method of managing our website as well as adding or removing additional virtual sites I might want to add. The thought was that by using this, I would avoid manual editing configuration files.

I went ahead with the installation which seemed to go as planned. However, after creating the websites, trying to access them from a browser they all of them arrived at the same/common destination of /var/www and would list the contents. This folder contains folders named "web1, web2, etc. as well as links such as www.site1.com (linking to web1), www.site2.com (linking to web2), etc.) so it looks like ISPConfig created them, but for some reason they aren't accessed when the address is put into the Browser. I do not know why this is happening, shouldn't ISPConfig have configured them for me?

Thinking maybe not, I remembered the first link I used at onlamp and tried that. It seemed to work, though I think that maybe that method is now outdated...as I found a newer guide at http://www.debuntu.org/2006/02/22/7-...using-apache-2.

I then tried this method. However, after doing that, I am now getting the message "[warn] VirtualHost site2.com:0 overlaps with VirtualHost site1.com:0, the first has precedence, perhaps you need a NameVirtualHost directive.

Can anyone tell me if I am even on the right path here? The first link I sent seems to be older, so I abandoned it, the second seemed better suited to what I was trying to do, but it doesn't seem to be working, and I still am wondering if I should have had to try either or if ISPConfig should have done it for me but didn't because there is another issue!

I have been searching like crazy the last couple days, but it is difficult when I am not sure which direction I should even be following...

Any pointers/help would be appreciated!
Reply With Quote
Sponsored Links
  #2  
Old 11th May 2007, 22:58
Ashaman074 Ashaman074 is offline
Junior Member
 
Join Date: May 2007
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Default

OK, a little more beating my head against the wall and I think I realized what the last error was saying.

I think that basically I had two different methods of doing the same thing...ISPConfig creates the virtual hosts in the /etc/apache2/vhosts/vhosts_ispconfig.conf file. I then used the method in the second web link (the debuntu.org one) to create virtual host conf files in the /etc/apache2/sites-available.

As a result, it was two methods of doing the same thing, sound reasonable?

I noticed that in the Apache section of webmin (which is also installed) the virtual hosts I had created were listed twice, removing my entries seems to have resulted in them only being listed once, and the error I listed in the last post being eliminated.

Unfortunately, I am also right back where I started, with the virtual hosts not working again. Entering the IP directly or typing any of the domains just lists the contents of /var/www.

There must be something is ISPConfig I am missing?

TIA!!
Reply With Quote
  #3  
Old 11th May 2007, 23:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,799
Thanks: 840
Thanked 5,613 Times in 4,424 Posts
Default

Please create the websites in ISPConfig. Ddo not use webmin together with ISPConfig and do not create any sites manually in /etc/apache2/sites-available!

You do not need to configure anything manually, the complete vhost configuration is done by ISPConfig. To preare your server for ISPConfig, please use one of the guides listed on the ISPconfig documentation page.

Is your server behind a roter? Then you must use your interna (privete) IP address for the websites and not your external IP.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 11th May 2007, 23:26
Ashaman074 Ashaman074 is offline
Junior Member
 
Join Date: May 2007
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks for the post - I actually did use a guide, "The Perfect Setup - Ubuntu 6.10 Server (Edgy Eft)
", and it all went smoothly. Thanks for the information regarding configuration.

I now have the Virtual hosts working (for web access anyway). This server is also the firewall; and it is performing PAT. Webmin actually helped point me in the right direction; if not configure anything.

It seems that my Vhosts_ispconfig.conf file listed sites like this "ServerName www.server1.com:80" I removed the "80" from the end, and they seem to be working fine! Does that tell us anything useful? I don't know why it happened or was a problem...

The one problem I do still see right off is that entering the external IP directly does not bring up the "shared IP" website, but instead lists the contenet of /var/www. I will continue checking this out, but again any suggestions are appreciated.

It seems the problem is related to using *, the internal IP, or the internal IP:80 ....?

Here is a section of my .conf file:

###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 10.0.0.1:80
<VirtualHost 10.0.0.1:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.thelawrencebarn.com:80
######################################
#
#
<VirtualHost *>
ServerName www.thelawrencebarn.com
ServerAdmin webmaster_1@thelawrencebarn.com
DocumentRoot /var/www/web2/web
ServerAlias thelawrencebarn.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/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
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/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
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>
#

Last edited by Ashaman074; 11th May 2007 at 23:43.
Reply With Quote
  #5  
Old 12th May 2007, 19:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by Ashaman074
It seems the problem is related to using *, the internal IP, or the internal IP:80 ....?
It must be internal IP:80.

and please make sure that the IP address you use is listed in the output of
Code:
ifconfig
__________________
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
  #6  
Old 14th May 2007, 02:52
Ashaman074 Ashaman074 is offline
Junior Member
 
Join Date: May 2007
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Unhappy

Thanks for the reply and confirming that

As you can see in my file, the first section is:

NameVirtualHost 10.0.0.1:80
<VirtualHost 10.0.0.1:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>

So that is correct, right?

But then, later it had the lines:

<VirtualHost 10.0.0.1:80>
ServerName www.thelawrencebarn.com:80

This is where things broke down and didn't work properly until I changed it to:

<VirtualHost *>
ServerName www.thelawrencebarn.com

Then it seemed to work properly. I do not know why this is. Unfortunately, the first section still does not seem to work properly, as typing the server's IP into a web browser does not bring up the "sharedip" page. It lists the directory contents instead. Any other ideas?

I am wondering if I should just abandon this whole path, as the idea was to simplify things; but it is turning into a diversion from the project at this point, and I don't know what else to try.

Also - IFConfig does list 10.0.0.1.

Thanks!
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
Virtual Hosts K_meleonu Server Operation 8 16th January 2010 20:11
ISPconfig Virtual Hosts + Perfect setup Problem ? orasis Installation/Configuration 5 16th March 2007 11:46
No Virtual Hosts tac Installation/Configuration 5 5th August 2006 17:02
postfix config jmroth Installation/Configuration 6 18th September 2005 16:58
Virtual hosts not working erik Installation/Configuration 1 25th August 2005 16:45


All times are GMT +2. The time now is 13:41.


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