Thanks ascs. This is a good explanation.

The only other question that partially remains unanswered is that if I run
apacheN on port 80 (and access my site as http://mysite.com) and run
apacheN+1 on port 8080 (and access site as http://mysecondsite.com:8080) -
what can i do special to access http://mysecondsite.com:8080 without the
port number (as if it was running on port 80). Did you get what I was trying
to say? Is this a legtimate question? :)

On Jan 18, 2008 11:13 PM, Axel-Stephane SMORGRAV <
[EMAIL PROTECTED]> wrote:

> You can have as many instances of Apache as you wish on a Unix box. On
> Windows, I do not know but I suppose you can. Just like two Vhosts, two
> servers cannot bind the same IP/port combo.
>
> What I do is that I make a server root for each instance of Apache. In
> that server root I create the directories bin, conf, cgi-bin and htdocs. I
> create a log directory on another disk partition.
>
> In the bin directory you need a copy of apachectl which will somehow start
> httpd pointing to the right configuration file. You may for example
> hard-code the paths to log directory, conf directory etc.  In my case I
> modified apachectl so that it automatically figures out where to get the
> config file from based on the directory in which the script is located.
>
> By typing "/servers/apacheN/bin/apachectl start", I start instance N. My
> apachectl script determines the script path, does 'dirname' to find the name
> of the parent directory which is the server root. A 'filename' on the server
> root will yield the instance name which can be appended to the log root path
> /logs to obtain /logs/apacheN.
>
> Instance configurations:
>
> /servers
>        |----->apacheN
>        |               |-----> bin (contains only apachectl and an envvars
> file with LD_LIBRARY_PATH and some other environment vars)
>        |               |-----> conf
>        |               |-----> htdocs (the document root of this instance)
>        |               |-----> cgi-bin
>        |
>        |----->apacheN+1
>                        |-----> bin
>                        |-----> conf
>                        |-----> htdocs
>                        |-----> cgi-bin
>
> Log files:
> /logs
>        |----->apacheN
>        |----->apacheN+1
>
>
> Apache distribution:
> /opt/apache2
>        |-----> bin
>        |-----> lib
>        |-----> modules
>        |-----> include
>        |-----> manual
>      |-----> icons
>
> Hope this helps
>
> -ascs
>
> -----Message d'origine-----
> De : Krist van Besien [mailto:[EMAIL PROTECTED]
> Envoyé : vendredi 18 janvier 2008 15:49
> À : users@httpd.apache.org
> Objet : Re: [EMAIL PROTECTED] Multiple Instances of Apache
>
> On Jan 18, 2008 3:22 PM, Mandy Singh <[EMAIL PROTECTED]> wrote:
> > Hi Everyone,
> >
> > I would like to know the experts thoughts on having multiple instances
> > of apache on the same box.
> >
> > Suppose I run an app off an instance of apache, then using VHosts add
> > 2-3 diff mini sites to it.
> >
> > If due to some reason one of the app causes apache to get hung, all my
> > apps become inaccessible.
> >
> > In such a scenario, since app 3 is extremely important is it
> > adivisable to have another instance of apache running off the same box
> > and serving app3 so that is away from my main app (that sometimes causes
> problems)?
>
> You can have multiple apaches on one box. They will all have to be bound
> to a different port however.
> What you could do is have for example a main apache on port 80, and three
> separate apaches for each app on eg. ports 8080, 8081, and 8082.
> In you main apache you then proxy requests for the three different apps to
> the correct server.
> This gives you a couple of things:
> - Each app runs in its own space.
> - Each app can run under a different user.
> - With port nrs > 1024 a non root user can start - stop the server.
>
> Krist
>
> --
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Bremgarten b. Bern, Switzerland
> --
> A: It reverses the normal flow of conversation.
> Q: What's wrong with top-posting?
> A: Top-posting.
> Q: What's the biggest scourge on plain text email discussions?
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>   "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>   "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to