Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th March 2009, 05:52
dcarlos dcarlos is offline
Junior Member
 
Join Date: Mar 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default ispconfig3 Multiple Sites (Domains) in one Server

I'm trying to figure out how to use ispconfig3 to host two different Sites (Domains) in a single Server.

First of all I should say I'm not a server admin expert

I can add the two Sites, for example:
www.mydomain1.com and www.mydomain2.com

However this seams to generate two equal VirtualHosts in the httpd configuration.
mydomain1.com.vhost:
...
<VirtualHost *:80>
...

mydomain2.com.vhost:
...
<VirtualHost *:80>
...
In apache one will overlap the other, right?
Am I supposed to use Virtual IP addresses to do this?

Shouldn't ispconfig3 use domain names in the VirtualHost directive instead of ip addresses?
If so we would have:
<VirtualHost mydomain1.com:80>

Thanks in advance,
duarte

Last edited by dcarlos; 14th March 2009 at 06:13.
Reply With Quote
Sponsored Links
  #2  
Old 14th March 2009, 10:55
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Just click on new domain, enter the domain and click on save. You can add hundreds or thousands of domains like this to the same server.

Quote:
However this seams to generate two equal VirtualHosts in the httpd configuration.
No. They are not equal as the domain of the vhost does not has to be set in the virtualhost directive. Just try it and you see that it works.

Quote:
In apache one will overlap the other, right?
No.

Quote:
Am I supposed to use Virtual IP addresses to do this?
No.

Quote:
Shouldn't ispconfig3 use domain names in the VirtualHost directive instead of ip addresses?
No.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
dcarlos (15th March 2009)
  #3  
Old 15th March 2009, 02:42
dcarlos dcarlos is offline
Junior Member
 
Join Date: Mar 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Thumbs up Thanks

Correct. Thanks for the help!
Reply With Quote
  #4  
Old 18th June 2009, 15:12
OvrFlote OvrFlote is offline
Junior Member
 
Join Date: May 2009
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Not exactly true

I came to this forum for some help and found this thread. It seemed to be right on track with the problem I am having, but his issue seems to be resolved and I'm still having the issue.

I installed ispconfig3 over opensuse 11.1 on an old box I had laying around.
I have 2 domain names from dyndns.com (one for me, and one for my wife)
I set her site up first everything works great, then I set my site up, and the problem begins.

when i run the command:

/etc/init.d/apache2 restart

this is what i get now:

[Thu Jun 18 07:55:37 2009] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) [Thu Jun 18 07:55:38 2009] [warn] _default_ VirtualHost overlap on port 80, the first has precedence

so it seems as though, the original post about the virtualhosts overlapping is true.

so now i recieve the generic ispconfig "Welcome!" when i go to either site. I have racked my brain for months on this so i decided to post.

and if you can't tell I am a Newb. so go easy if i am doing something stupid.
Reply With Quote
  #5  
Old 18th June 2009, 16:12
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Quote:
so now i recieve the generic ispconfig "Welcome!" when i go to either site.
Thats fine as this message is only shown when your sites are working. So now just upload the content of your sites and delete the default index.html file created by ispconfig.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 18th June 2009, 16:27
OvrFlote OvrFlote is offline
Junior Member
 
Join Date: May 2009
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Thats fine as this message is only shown when your sites are working. So now just upload the content of your sites and delete the default index.html file created by ispconfig.
well, the problem was that my wife's site was setup and working fine (with content), but upon me adding my site VIA ispconfig 3, did both pages start showing the same default "Welcome!" html.

it was because apache2 was defaulting to serving only one site on both domains.

Last edited by OvrFlote; 18th June 2009 at 16:29.
Reply With Quote
  #7  
Old 18th June 2009, 16:23
OvrFlote OvrFlote is offline
Junior Member
 
Join Date: May 2009
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Nevermind

Ok so this is what I did to fix the issue, hope this helps some other fellow linux newbs.

cd /etc/apache2

vi listen.conf

delete the # in front of "NamedVirtualHost *:80"

==========================================
# Use name-based virtual hosting
#
# - on a specified address / port:
#
#NameVirtualHost 12.34.56.78:80
#
# - name-based virtual hosting:
#
NameVirtualHost *:80
#
# - on all addresses and ports. This is your best bet when you are on
# dynamically assigned IP addresses:
#
#NameVirtualHost *
===============================================

Then,

cd vhosts.d
cp vhost.template YourDomain1.com.conf
cp vhost.template YourDomain2.com.conf
vi YourDomain1.com.conf

Now, you need to replace all the "dummy-site.com's" with YourDomain1.com, but that is it, do not uncomment anything unless you know what you are doing.

vi YourDomain2.com.conf

Now, you need to replace all the "dummy-site.com's" with YourDomain2.com, but that is it, do not uncomment anything unless you know what you are doing.

Finally, restart apache

/etc/init.d/apache2 restart

you should see

Syntax OK
Shutting down httpd2 (waiting for all children to terminate) [my wife hates that terminology, lol]
Starting httpd2 (prefork)

there should not be anymore overlapping errors.

this is my own newb strategy and it worked for me, I now have two sites running on one server with one ip.

My setup is the perfect server opensuse 11.1 ispconfig 3 [thank you sourceforge]

my question is, why doesn't ispconfig 3 do this automatically??

Anyway, hope this helps someone. thanks again everyone.

Last edited by OvrFlote; 18th June 2009 at 16:28.
Reply With Quote
  #8  
Old 18th June 2009, 16:29
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

ISPConfig uses the directory sites-enabled and not vhosts.d. You will find all vhosts in the sites-eanbled subdirectory. The directory vhosts.d must be empty or ispconfig will not work properly anymore.

If the vhost files are not in the directory sites-enabled then there is aerror in your configuration and you have to check the mintor why the files could not be written.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
apache, domain, ispconfig3, site, virtualhost

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
Ubuntu Server, postfix, gmail relay sjau Server Operation 3 14th December 2010 18:20
The Perfect Setup - Debian Etch (Debian 4.0) some trouble daniel80 HOWTO-Related Questions 26 1st February 2008 16:30
subdomain and mail relay configuration aranthorn Installation/Configuration 24 3rd September 2007 22:53
Webmail Relay Error palkat General 17 23rd April 2006 18:12
Multiple SSL sites on 1 server heat Server Operation 1 26th April 2005 13:05


All times are GMT +2. The time now is 15:59.


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