Author: jfrederic.clere(a)jboss.com
Date: 2010-05-04 12:26:40 -0400 (Tue, 04 May 2010)
New Revision: 2663
Modified:
trunk/build/unix/buildbin.mod_cluster.sh
Log:
MODCLUSTER-150
Modified: trunk/build/unix/buildbin.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.sh 2010-05-04 10:04:50 UTC (rev 2662)
+++ trunk/build/unix/buildbin.mod_cluster.sh 2010-05-04 16:26:40 UTC (rev 2663)
@@ -225,6 +225,68 @@
done
fi
+# Add default mod_cluster conf in httpd.conf
+cat >> "${RPM_BUILD_ROOT}/opt/jboss/httpd/httpd/conf/httpd.conf"
<<EOF
+# MOD_CLUSTER_ADDS
+# Adjust to you hostname and subnet.
+<IfModule manager_module>
+ Listen 127.0.0.1:6666
+ ManagerBalancerName mycluster
+ <VirtualHost 127.0.0.1:6666>
+ <Directory />
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0
+ </Directory>
+
+ KeepAliveTimeout 300
+ MaxKeepAliveRequests 0
+ #ServerAdvertise on http://@IP@:6666
+ AdvertiseFrequency 5
+ #AdvertiseSecurityKey secret
+ #AdvertiseGroup @ADVIP@:23364
+
+ <Location /mod_cluster_manager>
+ SetHandler mod_cluster-manager
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0
+ </Location>
+
+ </VirtualHost>
+</IfModule>
+EOF
+
+# Arrange pathes so that the stuff can run in ~
+if [ "${BUILD_SYS}" != "windows" ]; then
+ BASEHTTPD=/opt/jboss/httpd/
+ HTTPDCONF=httpd/conf
+ HTTPDSBIN=sbin
+ HTTPDBUILD=htdocs/build
+ files="${HTTPDSBIN}/apachectl ${HTTPDCONF}/httpd.conf ${HTTPDSBIN}/envvars
${HTTPDSBIN}/apxs ${HTTPDBUILD}/config_vars.mk"
+ for FILE in `echo $files`
+ do
+ file=${RPM_BUILD_ROOT}/${BASEHTTPD}/$FILE
+ echo "$file"
+ cp -p $file $file.new
+ sed "s:${BASEHTTPD}::" $file > $file.new
+ mv $file.new $file
+ done
+ # Arrange apachectl
+ file=$RPM_BUILD_ROOT/${BASEHTTPD}/${BASEHTTPDSBIN}/apachectl
+ cp -p $file $file.new
+ echo "s:\$HTTPD -k \$ARGV:\$HTTPD -k \$ARGV -d httpd:" > sed.cmd
+ sed -f sed.cmd $file > $file.new
+ mv $file.new $file
+
+ # Arrange httpd.conf (ServerRoot)
+ file=$RPM_BUILD_ROOT/${BASEHTTPD}/${HTTPDCONF}/httpd.conf
+ cp -p $file $file.new
+ echo "s:ServerRoot \".*:ServerRoot \".\":" > sed.cmd
+ sed -f sed.cmd $file > $file.new
+ mv $file.new $file
+fi
+
# Also build the java part.
(cd ../mod_cluster
mvn -P dist package -Djboss.server.log.dir=`pwd` -Djava.net.preferIPv4Stack=true
Show replies by date