RE: [users@httpd] Running multiple daemons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm running apache from the rpm install on linux.  I would usually install as you suggest, but it's the init scripts that are tripping me up.  Everything is set up to handle httpd and httpd.pid, but not httpd-stage, etc.


Jason Lingel
Systems Administration
RAND
(310) 393-0411, ext. 7990
jasonl@xxxxxxxx


-----Original Message-----
From: James Richardson [mailto:james.richardson@xxxxxx]
Sent: Thursday, April 28, 2005 3:18 AM
To: users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] Running multiple daemons



Easiest way in my experience is simply to install twice, to different
directories.

/opt/apache/http-2.0.xx/prod
/opt/apache/http-2.0.xx/test

The apache install will take care of all the paths etc, so you don't need
to worry about that.

(outlook will do random capitalisation to my email, sorry about that...)

I've done this using a couple of scripts....you could make this more
complicated, but this works ok.

Apache
 Configure-yourapache.sh
 Configure-test.sh
 Configure-prod.sh
 Httpd-2.0.xx.tar.gz

When you want to build, remove any previous build directories, then

Tar zxf httpd-2.0.xx.tar.gz
Cd httpd-2.0.xx
../configure-prod.sh


configure.sh
#!/bin/sh
./configure "--with-mpm=worker" "--enable-mods-shared=all proxy cache
disk-cache" "--prefix=$my_apache_dir" "--enable-deflate" "$@"

Configure-test.sh
#!/bin/sh
Called=`dirname $0`
Export my_apache_dir=/opt/apache/apache-2.0.xx/test
$called/configure.sh

Configure-prod.sh
#!/bin/sh
Called=`dirname $0`
Export my_apache_dir=/opt/apache/apache-2.0.xx/prod
$called/configure.sh


This makes sure that test/prod are built the same, but in different
directories.

Then in your httpd.conf files, you remove all common stuff to separate
file(s)

Test/conf/httpd.conf -> /somewhere/conf/Httpd.conf.test
Prod/conf/httpd.conf -> /somewhere/conf/http.conf.prod

Httpd.conf.test

DocumentRoot "/somewhere/content/test"
Listen xxx
....
Include /somewhere/conf/common/common.inc

...


Httpd.conf.prod
DocumentRoot "/somewhere/content/prod"
Listen yy
Include /somewhere/conf/common/common.inc

Hope that helps,

James










> -----Original Message-----
> From: Lingel, Jason [mailto:jasonl@xxxxxxxx]
> Sent: 27 April 2005 23:27
> To: users@xxxxxxxxxxxxxxxx
> Subject: [users@httpd] Running multiple daemons
> 
> I'm running apache 2.0.46 on linux and want to run multiple daemons.
One
> web site will be the production site and the other will be the test
site.
> I want to run two daemons so I can bring the test site up and down at
will
> without impacting production and make config changes for testing if
> needed.
> 
> I have two different ip addresses and use two different httpd.conf
files,
> one pointing at a different config. file, i.e.:
> 
> httpd -f /etc/httpd/conf/httpd-stage.conf
> 
> I can get these started well enough but I need to get them to autostart
on
> reboot and the /etc/init.d/httpd script only handles httpd.conf.  I
> created a separate /etc/init.d/httpd-stage script but I'm having to hack
> at it and import and modify functions from the /etc/init.d/functions
> script to make things work.
> 
> It seems like this is a path that should be well-traveled but I haven't
> found much in the newsgroups about it.  Has anybody seen this process
> documented anywhere or have any clues about how to make it work other
than
> hacking at the init scripts?
> 
> TIA.
> 
> Jason Lingel
> jasonl@xxxxxxxx
> 
> 
> --------------------
> 
> This email message is for the sole use of the intended recipient(s) and
> may contain privileged information. Any unauthorized review, use,
> disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all
copies
> of the original message.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




--------------------

This email message is for the sole use of the intended recipient(s) and
may contain privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.




---------------------------------------------------------------------
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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux