Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Multiple Site Config Apache 1.3.X "Best Practice?"

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  FTP and Mail server  
Author Message
trhaverstock

External


Since: Jul 31, 2003
Posts: 2



(Msg. 1) Posted: Thu Jul 31, 2003 12:36 pm
Post subject: Multiple Site Config Apache 1.3.X "Best Practice?"
Archived from groups: alt>apache>configuration, others (more info?)

What is the 'best practice' configuration for hosting multiple Apache
1.3.X web sites (actuall around 10 small applications) on a single
(large) Unix (HP-UX) server? This is a web server in a corporate
environment with multiple teams sharing it. We want to reasonably
lock this down so that ea app doesn't step on the other (high use or
bad code), people don't alter one another's files on the file system,
etc.

Right now, each web site has its own IP address and virtual dir, but
they all share the same config files and only one person has the
ability to bounce the httpd process but it then takes everyone's site
down. Some sites are using PHP and some are using Tomcat 3.X for
JSP/servlets.

Is there anything documented out there on Apache's site (or elsewhere)
on the 'right way' or 'best practices' approach to do this? I'm told
multiple instances/config files with one install are the way to go. I
need to 'proof' to back up my case. I would think I want this setup
the same way an ISP would host 50 or so Apache sites or so on a large
server.

I've done some searching on this, but I must be searching on the wrong
keywords. Any suggestions appreciated!

Regards,
Todd
trhaverstock RemoveThis @yahoo.com

 >> Stay informed about: Multiple Site Config Apache 1.3.X "Best Practice?" 
Back to top
Login to vote
deatrich

External


Since: Aug 02, 2003
Posts: 1



(Msg. 2) Posted: Sat Aug 02, 2003 10:22 pm
Post subject: Re: Multiple Site Config Apache 1.3.X "Best Practice?" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

trhaverstock RemoveThis @yahoo.com (Todd R. Haverstock) writes:

 >What is the 'best practice' configuration for hosting multiple Apache
 >1.3.X web sites (actuall around 10 small applications) on a single
 >(large) Unix (HP-UX) server? This is a web server in a corporate
 >environment with multiple teams sharing it. We want to reasonably
 >lock this down so that ea app doesn't step on the other (high use or
 >bad code), people don't alter one another's files on the file system,
 >etc.

 >Right now, each web site has its own IP address and virtual dir, but
 >they all share the same config files and only one person has the
 >ability to bounce the httpd process but it then takes everyone's site
 >down. Some sites are using PHP and some are using Tomcat 3.X for
 >JSP/servlets.

 >Is there anything documented out there on Apache's site (or elsewhere)
 >on the 'right way' or 'best practices' approach to do this? I'm told
 >multiple instances/config files with one install are the way to go. I
 >need to 'proof' to back up my case. I would think I want this setup
 >the same way an ISP would host 50 or so Apache sites or so on a large
 >server.

 >I've done some searching on this, but I must be searching on the wrong
 >keywords. Any suggestions appreciated!

I'm not sure what you mean by 'multiple instances/config files with one
install' -- is this Tomcat-ese?

If you can push the teams sharing this web service to use different
ports, then you could run independent web services on the same machine.
I have used this technique in the past in a small way to run 2 independent
apache trees -- one on port 80 and another on port 8001. One tree
was the 'production' tree and the other was the 'test' tree. The only
thing to be careful of is that your startup-shutdown scripts for the web
server are bullet-proof. The main advantages are that configuration is
very independent, and that any one group can restart their web server without
taking down the others. The main disadvantages are that this technique sucks
if your web trees need to be public (people don't seem to like urls that look
like xxx.yy.com:6666/ :-{ ), and/or your teams work behind strict and
disparate firewalls.

About configurations:
I have no experience with Tomcat and its configuration, but with PHP I see
no problems in differing php configurations -- just specify them inside
the virtual host definitions.
cheers,
denice
--
denice.deatrich @ epfl.ch, DSC / LTHC-LTHI, E.P.F.L. PH: +41 (21) 693 76 67
<*> This moment's fortune cookie:
If it ain't baroque, don't phiques it.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Multiple Site Config Apache 1.3.X "Best Practice?" 
Back to top
Login to vote
user2407

External


Since: Aug 02, 2003
Posts: 2



(Msg. 3) Posted: Sun Aug 03, 2003 1:00 am
Post subject: Re: Multiple Site Config Apache 1.3.X "Best Practice?" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 31 Jul 2003 18:36:05 +0200, Todd R. Haverstock wrote:

 > What is the 'best practice' configuration for hosting multiple Apache
 > 1.3.X web sites

Basically, the most common way to have 10 Apache configs
running at the same time (for example, depending on the hostname used to
reach the server if it has several hostnames, or depending on the IP) is
to use VirtualHost.

But then each Apache child process (Apache spreads a child to serve a
request when all existing children are already busy serving other
requests) will have what it takes to run any of the 10 applications. For
example, if one of the application needs little system ressource but
serves many requests, whereas another one has to serve few requests but
needs much memory, then the first one will make Apache spreads many
children, and the second one will make each child use much memory... you
see the problem.

Also, this means that to restart an application you must restart all
children serving this application, id est all children.

So if you don't want this you must start several Apache : I think you
need the binaries only once, but start it with 10 different httpd.conf
files, specifying different values for PidFile and different ports.

Hth,

--
Jihem<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Multiple Site Config Apache 1.3.X "Best Practice?" 
Back to top
Login to vote
trhaverstock

External


Since: Jul 31, 2003
Posts: 2



(Msg. 4) Posted: Mon Aug 04, 2003 5:59 pm
Post subject: Re: Multiple Site Config Apache 1.3.X "Best Practice?" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jean-Michel Grimaldi <jm.TakeThisOut@via.ecp.fr> wrote in message news:<pan.2003.08.02.20.00.13.30888.2241.TakeThisOut@via.ecp.fr>...
 > On Thu, 31 Jul 2003 18:36:05 +0200, Todd R. Haverstock wrote:
 >
  > > What is the 'best practice' configuration for hosting multiple Apache
  > > 1.3.X web sites
 >
 > Basically, the most common way to have 10 Apache configs
 > running at the same time (for example, depending on the hostname used to
 > reach the server if it has several hostnames, or depending on the IP) is
 > to use VirtualHost.
 >
 > But then each Apache child process (Apache spreads a child to serve a
 > request when all existing children are already busy serving other
 > requests) will have what it takes to run any of the 10 applications. For
 > example, if one of the application needs little system ressource but
 > serves many requests, whereas another one has to serve few requests but
 > needs much memory, then the first one will make Apache spreads many
 > children, and the second one will make each child use much memory... you
 > see the problem.
 >
 > Also, this means that to restart an application you must restart all
 > children serving this application, id est all children.
 >
 > So if you don't want this you must start several Apache : I think you
 > need the binaries only once, but start it with 10 different httpd.conf
 > files, specifying different values for PidFile and different ports.

I think this is the route I want to go. I would have my startup
script launch the 10 Apache daemons each with different httpd.conf
files, different app homes, and different IP addresses. The main
benefit (for me) being that any instance can be bounced, config
altered, etc without impacting the other applications.

My final questions:
1) How big is the performance hit of 10 Apache daemons vs. 1 daemon
with multiple sites under it? What if I lower the workers from
default of 5 to 2 or 3?

2) Is there any article/document out there that documents this as a
'best practice' or recommended configuration for many developers of
many different applications on a single (large) server? Isn't this
how an Apache-hosting ISP would set up their gig?

Thanks!
Todd<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Multiple Site Config Apache 1.3.X "Best Practice?" 
Back to top
Login to vote
user2407

External


Since: Aug 02, 2003
Posts: 2



(Msg. 5) Posted: Tue Aug 05, 2003 4:19 am
Post subject: Re: Multiple Site Config Apache 1.3.X "Best Practice?" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 04 Aug 2003 23:59:30 +0200, Todd R. Haverstock wrote:
 > 1) How big is the performance hit of 10 Apache daemons vs. 1 daemon with
 > multiple sites under it? What if I lower the workers from default of 5
 > to 2 or 3?

This basically means no shared memory between child processes of
different applications, and a father process for each application.
For the 1st point however I have experienced that under some systems
(AIX, Apache running with mod_perl) there is very little shared memory.
For the 2nd point, you have to consider that a father process typically
uses about 10 Mo in memory.

 > What if I lower the workers from default of 5 to 2 or 3?

This totally depends on the use of your applications. If 5 users
require a page at the same time, you have to spread 5 children.

 > 2) Is there any article/document out there that documents this as a
 > 'best practice' or recommended configuration for many developers of many
 > different applications on a single (large) server? Isn't this how an
 > Apache-hosting ISP would set up their gig?

From what I've read here, Apache-hosting ISP will tell you to tune the
config using .htaccess files. The configuration specificities will be
more limited, but maybe it will be ok for your use. To know this, list
the directives you want to allow your users to tweak then look in the Apache
doc ('Context' field for each directive) if this directive can be put in
a .htaccess file.

--
Jihem<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Multiple Site Config Apache 1.3.X "Best Practice?" 
Back to top
Login to vote
barry4

External


Since: Aug 09, 2003
Posts: 4



(Msg. 6) Posted: Sat Aug 09, 2003 8:52 pm
Post subject: Re: Multiple Site Config Apache 1.3.X "Best Practice?" [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Todd R. Haverstock" <trhaverstock RemoveThis @yahoo.com> wrote in message
news:9390905d.0307310836.79df39d8@posting.google.com...
 > What is the 'best practice' configuration for hosting multiple Apache
 > 1.3.X web sites (actuall around 10 small applications) on a single
 > (large) Unix (HP-UX) server? This is a web server in a corporate
 > environment with multiple teams sharing it. We want to reasonably
 > lock this down so that ea app doesn't step on the other (high use or
 > bad code), people don't alter one another's files on the file system,
 > etc.
 >
 > Right now, each web site has its own IP address and virtual dir, but
 > they all share the same config files and only one person has the
 > ability to bounce the httpd process but it then takes everyone's site
 > down. Some sites are using PHP and some are using Tomcat 3.X for
 > JSP/servlets.
 >
 > Is there anything documented out there on Apache's site (or elsewhere)
 > on the 'right way' or 'best practices' approach to do this? I'm told
 > multiple instances/config files with one install are the way to go. I
 > need to 'proof' to back up my case. I would think I want this setup
 > the same way an ISP would host 50 or so Apache sites or so on a large
 > server.
 >
 > I've done some searching on this, but I must be searching on the wrong
 > keywords. Any suggestions appreciated!

I'm wondering, after reading the other replies to post, if maybe a VPS setup
might be more to your taste. That way each server gets it's own share of HD
space, of memory, and of the CPU. From what I gather about VPS software is
that it's most certainly ideal if you'd like to allow different users to
administrate only specific areas (re: hosts) and not others.

Or considering that I have yet to meet any open-source/free VPS software
(hence my reasoning for never implementing such a setup) if a chroot by
vhost might work for you. That way you still run an apache daemon outside of
the chroot to act as the vhost proxy.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Multiple Site Config Apache 1.3.X "Best Practice?" 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]