LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 01-20-2005, 02:08 AM   #1
solferino
LQ Newbie
 
Registered: Jul 2004
Location: Italy
Distribution: Debian/sid
Posts: 11

Rep: Reputation: 0
Multiple Apache instances on Debian


Hi,
I have a VirtualPrivateServer running Debian.

Well my aim is to have multiple Apache instances, I mean multiple httpd daemons that are related to different httpd.conf.

My aim is to have a main Apache listening to port 80, then for some domains name to do a proxy to an internal port such as 8000 8001 etc.

So for example the httpd running at port 8000 will be a web site of a friend of mine.
The httpd running at port 8001 will be and I will use it to do some test with mod_rewrite.c etc.

My aim was to have the website of the friend of mine always running while I can reboot my httpd without affecting it.

``Hacking" httpd.conf is not a problem for me.

I'm asking what's the best way so that when my server boot I can launch more than one httpd.

I was thinking to edit /etc/init.d/apache2 and from there to launch more than one httpd daemons pointing to different httpd.conf.

Any suggestion will be appreciated.


Thanks

p.s.
Didn't think about it.
I think I have to make a copy of the httpd daemon and call them httpd8000 httpd8001 etc.
Then I have to add them to /etc/rc.d.

Last edited by solferino; 01-20-2005 at 02:14 AM.
 
Old 01-20-2005, 02:53 AM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Location: /illinois/chicago
Distribution: Slackware/Gentoo/FC/RHEL
Posts: 568

Rep: Reputation: 30
This is very simple. You only need to duplicate the apache directory, and all that goes with it.
Your apache2 idea will work just fine.
You don't need to rename the httpd daemon, as anytime you run apache, or httpd, you will notice a PID for every open connection that you have. This is why httpd.conf will allow you to limit the number of simultaneous connections, as so not to kill your machine if you are a serving bandwidth intensive apps, or just don't want to become the victim of a DoS attack.

As far as the rc.d is concerned, simply put the full path to the httpd that you want to start - for instance, you could have one in a dir labled 8000, and one for 8001.....etc......

GL!!!
 
Old 08-23-2005, 09:44 AM   #3
greanie
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
multiple apache instances

I've been trying to run multiple instances for quite a while but without luck. Hopine either of you might help. I am trying to run multiple instances of apache2 on my box so I can migrate plain perl scripts to mod_perl. I have copied & modified necessary config files & apachectl to another directory. I added a pid file directive in httpd.conf and modified apachectl and am using separate user & group for the second instance. I can run either of these one at a time, but I can't start the new while the old set up is running and vice versa. Why can't I get the two running simultaneously???!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Instances of MPlayer? Levitate Linux - Software 2 01-13-2005 01:04 PM
Multiple instances of PHP cubax Linux - Newbie 6 12-30-2004 09:04 PM
Mplayer and Multiple instances Spaz007 Linux - Software 0 09-16-2004 11:59 PM
multiple instances of processes? ararag Linux - Software 2 07-31-2004 11:27 AM
Multiple instances of same user justinv Linux - General 7 01-19-2003 05:05 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration