Gentoo Archives: gentoo-server

From: "pkoelle@×××××.com" <pkoelle@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] Two Apache Instances
Date: Sun, 04 Nov 2007 13:29:05
Message-Id: 472DC8AB.2050303@gmail.com
In Reply to: [gentoo-server] Two Apache Instances by Randy Barlow
1 Randy Barlow schrieb:
2 > Hi all, I am trying to get two instances of apache to run using the
3 > newer 2.2 version for my BackupPC server web interface.
4 I'd love to see standardized service multiplexing on gentoo. There were
5 implementations for mysql where you can specify multiple instances in
6 conf.d/mysql but without seperated start/stop/restart.
7
8 We have implemented this for an inhouse java app having a bash array in
9 conf.d like:
10
11 <appname>_<instname1> = (
12 "<param1>=<value1>"
13 "<param2>=<value2>"
14 ...
15 )
16
17 <appname>_<instname2> = (
18 ...
19 )
20
21 and a link <appname>.<instname> -> <appname> in init.d for each instance
22 like the net.xx scripts do. To make this work for apache you'd need
23 logic to override "Listen" and probably other settings in httpd.conf. A
24 seperate vhost.d for each instance might be appropriate.
25
26 made up sample config:
27
28 apache2_frontend = (
29 "port=193.114.114.89:80"
30 "opts=-D SSL -D LDAP"
31 "usergroup=apache:apache"
32 "config=/etc/apache2/apache2_frontend.conf"
33 )
34
35 apache2_backend1 = (
36 "port=127.0.0.1:1234"
37 "opts=-D PHP5 -D DAV"
38 "usergroup=user1:user1"
39 "config=/home/user1/apache_backend1.conf"
40 )
41
42 in combination with sudo:
43 user1 localhost=(ALL) NOPASSWD: /etc/init.d/apache2.backend1
44
45 This could be useful for proxied setups where you run user controlled
46 backends to seperate execution privileges.
47
48 cheers
49 Paul
50 --
51 gentoo-server@g.o mailing list