tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r1308247 - in /tuscany/sca-cpp/trunk/modules/http: Makefile.am proxy-balancer-conf proxy-base-conf proxy-member-conf
Date Mon, 02 Apr 2012 06:23:56 GMT
Author: jsdelfino
Date: Mon Apr  2 06:23:56 2012
New Revision: 1308247

URL: http://svn.apache.org/viewvc?rev=1308247&view=rev
Log:
Add scripts to configure multiple load balancers on a proxy server.

Added:
    tuscany/sca-cpp/trunk/modules/http/proxy-balancer-conf
      - copied, changed from r1308246, tuscany/sca-cpp/trunk/modules/http/proxy-member-conf
    tuscany/sca-cpp/trunk/modules/http/proxy-base-conf
      - copied, changed from r1308246, tuscany/sca-cpp/trunk/modules/http/proxy-member-conf
Modified:
    tuscany/sca-cpp/trunk/modules/http/Makefile.am
    tuscany/sca-cpp/trunk/modules/http/proxy-member-conf

Modified: tuscany/sca-cpp/trunk/modules/http/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/Makefile.am?rev=1308247&r1=1308246&r2=1308247&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/modules/http/Makefile.am Mon Apr  2 06:23:56 2012
@@ -20,7 +20,7 @@ INCLUDES = -I${HTTPD_INCLUDE}
 incl_HEADERS = *.hpp
 incldir = $(prefix)/include/modules/http
 
-dist_mod_SCRIPTS = httpd-conf httpd-addr httpd-start httpd-stop httpd-restart ssl-ca-conf
ssl-cert-conf ssl-cert-find httpd-ssl-conf basic-auth-conf cert-auth-conf form-auth-conf open-auth-conf
passwd-auth-conf group-auth-conf proxy-conf proxy-ssl-conf proxy-member-conf proxy-ssl-member-conf
proxy-ssl-nossl-member-conf vhost-conf vhost-ssl-conf tunnel-ssl-conf httpd-worker-conf httpd-event-conf
httpd-loglevel-conf minify-html minify-js minify-css
+dist_mod_SCRIPTS = httpd-conf httpd-addr httpd-start httpd-stop httpd-restart ssl-ca-conf
ssl-cert-conf ssl-cert-find httpd-ssl-conf basic-auth-conf cert-auth-conf form-auth-conf open-auth-conf
passwd-auth-conf group-auth-conf proxy-conf proxy-base-conf proxy-ssl-conf proxy-balancer-conf
proxy-member-conf proxy-ssl-member-conf proxy-ssl-nossl-member-conf vhost-conf vhost-ssl-conf
tunnel-ssl-conf httpd-worker-conf httpd-event-conf httpd-loglevel-conf minify-html minify-js
minify-css
 moddir = $(prefix)/modules/http
 
 curl_test_SOURCES = curl-test.cpp

Copied: tuscany/sca-cpp/trunk/modules/http/proxy-balancer-conf (from r1308246, tuscany/sca-cpp/trunk/modules/http/proxy-member-conf)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/proxy-balancer-conf?p2=tuscany/sca-cpp/trunk/modules/http/proxy-balancer-conf&p1=tuscany/sca-cpp/trunk/modules/http/proxy-member-conf&r1=1308246&r2=1308247&rev=1308247&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/proxy-member-conf (original)
+++ tuscany/sca-cpp/trunk/modules/http/proxy-balancer-conf Mon Apr  2 06:23:56 2012
@@ -17,24 +17,34 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-# Add a proxy balancer member
+# Generate a minimal HTTPD proxy balancer configuration
 here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
 mkdir -p $1
 root=`echo "import os; print os.path.realpath('$1')" | python`
 
-host=$2
-port=`$here/httpd-addr port $3`
-if [ "$port" = "80" ]; then
-    portsuffix=""
-else
-    portsuffix=":$port"
+bal=$2
+if [ "$bal" = "" ]; then
+    bal="cluster"
+fi
+loc=$3
+if [ "$loc" = "" ]; then
+    loc="/"
 fi
 
 cat >>$root/conf/vhost.conf <<EOF
-# Generated by: proxy-member-conf $*
-# Add proxy balancer member
-BalancerMember balancer://cluster http://$host$portsuffix
-ProxyPassReverse / http://$host$portsuffix/
+# Generated by: proxy-pass-conf $*
+# Enable load balancing
+ProxyPass $loc balancer://$bal/
+
+<Proxy balancer://$bal>
+Require all granted
+ProxySet lbmethod=byrequests
+</Proxy>
+
+<Location $loc>
+RequestHeader set X-Forwarded-HTTPS %{HTTPS}s
+RequestHeader set X-Forwarded-Port %{SERVER_PORT}s
+</Location>
 
 EOF
 

Copied: tuscany/sca-cpp/trunk/modules/http/proxy-base-conf (from r1308246, tuscany/sca-cpp/trunk/modules/http/proxy-member-conf)
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/proxy-base-conf?p2=tuscany/sca-cpp/trunk/modules/http/proxy-base-conf&p1=tuscany/sca-cpp/trunk/modules/http/proxy-member-conf&r1=1308246&r2=1308247&rev=1308247&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/proxy-member-conf (original)
+++ tuscany/sca-cpp/trunk/modules/http/proxy-base-conf Mon Apr  2 06:23:56 2012
@@ -17,24 +17,34 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-# Add a proxy balancer member
+# Generate a minimal HTTPD proxy balancer configuration
 here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
 mkdir -p $1
 root=`echo "import os; print os.path.realpath('$1')" | python`
 
-host=$2
-port=`$here/httpd-addr port $3`
-if [ "$port" = "80" ]; then
-    portsuffix=""
-else
-    portsuffix=":$port"
-fi
-
 cat >>$root/conf/vhost.conf <<EOF
-# Generated by: proxy-member-conf $*
-# Add proxy balancer member
-BalancerMember balancer://cluster http://$host$portsuffix
-ProxyPassReverse / http://$host$portsuffix/
+# Generated by: proxy-base-conf $*
+# Enable load balancing
+ProxyPass /balancer-manager !
+ProxyPass /server-status !
+ProxyPass /server-info !
+
+# Enable balancer manager
+<Location /balancer-manager>
+SetHandler balancer-manager
+HostnameLookups on
+Require user admin
+</Location> 
+
+EOF
+
+cat >>$root/conf/pubauth.conf <<EOF
+# Generated by: proxy-conf $*
+# Allow the server admin to manage the load balancer
+<Location /balancer-manager>
+HostnameLookups on
+Require user admin
+</Location>
 
 EOF
 

Modified: tuscany/sca-cpp/trunk/modules/http/proxy-member-conf
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/proxy-member-conf?rev=1308247&r1=1308246&r2=1308247&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/proxy-member-conf (original)
+++ tuscany/sca-cpp/trunk/modules/http/proxy-member-conf Mon Apr  2 06:23:56 2012
@@ -30,10 +30,15 @@ else
     portsuffix=":$port"
 fi
 
+bal=$4
+if [ "$bal" = "" ]; then
+    bal="cluster"
+fi
+
 cat >>$root/conf/vhost.conf <<EOF
 # Generated by: proxy-member-conf $*
 # Add proxy balancer member
-BalancerMember balancer://cluster http://$host$portsuffix
+BalancerMember balancer://$bal http://$host$portsuffix
 ProxyPassReverse / http://$host$portsuffix/
 
 EOF



Mime
View raw message