summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-11-28 07:17:11 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-11-28 07:17:11 +0000
commit14f1ada7b2bb66c6c3dae496d3963e9af3f0ab38 (patch)
tree01d610b53ba9b2088138d057f16ed6e5122cfe36 /sca-cpp/trunk/samples
parent6c67a3ca11e4bcd7715d92df2e3e41e4e3fc0dc9 (diff)
Use different servers for cert-based and password-based auth and use event MPMs for tunnel and proxy servers.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1039840 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/samples')
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-conf1
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-ssl-conf5
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-ssl-conf6
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-test7
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/ssl-start42
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/start12
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf6
-rwxr-xr-xsca-cpp/trunk/samples/store-python/redirect23
-rwxr-xr-xsca-cpp/trunk/samples/store-python/uec2-start2
-rwxr-xr-xsca-cpp/trunk/samples/store-vhost/uec2-start2
10 files changed, 44 insertions, 62 deletions
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-conf b/sca-cpp/trunk/samples/store-cluster/proxy-conf
index 5a61f13399..b60e7ba7f9 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-conf
@@ -26,6 +26,7 @@ set -x
../../modules/http/httpd-conf $root sca-store.com $port/80 $root/htdocs
../../modules/http/vhost-conf $root
../../modules/http/proxy-conf $root
+../../modules/http/httpd-event-conf $root
# Aggregate proxy balancer logs
category=`basename $root`
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
index 3379a3c789..fc329f0d18 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
@@ -24,11 +24,12 @@ sslport=$3
set -x
# Configure an SSL-enabled proxy balancer
-../../modules/http/httpd-conf $root sca-store.com $port/80 $root/htdocs
+../../modules/http/httpd-conf $root sca-store.com $port $root/htdocs
../../modules/http/vhost-conf $root
../../modules/http/proxy-conf $root
+../../modules/http/httpd-event-conf $root
tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
-../../modules/http/httpd-ssl-conf $root $sslport/443
+../../modules/http/httpd-ssl-conf $root $sslport
../../modules/http/vhost-ssl-conf $root
../../modules/http/proxy-ssl-conf $root
diff --git a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
index 8799fbdf6d..70662daab2 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
@@ -24,14 +24,13 @@ sslport=$3
set -x
# Configure an SSL-enabled app server
-../../modules/http/httpd-conf $root sca-store.com $port/80 htdocs
+../../modules/http/httpd-conf $root sca-store.com $port htdocs
../../modules/http/vhost-conf $root
tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
-../../modules/http/httpd-ssl-conf $root $sslport/443
+../../modules/http/httpd-ssl-conf $root $sslport
../../modules/http/vhost-ssl-conf $root
-#../../modules/http/basic-auth-conf $root
../../modules/oauth/oauth-conf $root
../../modules/oauth/oauth-memcached-conf $root localhost 11211
../../modules/oauth/oauth-memcached-conf $root localhost 11212
@@ -41,6 +40,7 @@ tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
../../modules/openid/openid-memcached-conf $root localhost 11211
../../modules/openid/openid-memcached-conf $root localhost 11212
../../modules/openid/openid-memcached-conf $root localhost 11213
+../../modules/http/open-auth-conf $root
../../modules/server/server-conf $root
../../modules/python/python-conf $root
diff --git a/sca-cpp/trunk/samples/store-cluster/server-test b/sca-cpp/trunk/samples/store-cluster/server-test
index 7f6ff4ead6..68856f530e 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-test
+++ b/sca-cpp/trunk/samples/store-cluster/server-test
@@ -17,6 +17,9 @@
# specific language governing permissions and limitations
# under the License.
+# For this test to work, add the test domain to your etc/hosts as follows:
+# 127.0.0.1 sca-store.com joe.sca-store.com joe.sca-store.com
+
echo "Testing..."
here=`readlink -f $0`; here=`dirname $here`
curl_prefix=`cat $here/../../modules/http/curl.prefix`
@@ -25,10 +28,6 @@ curl_prefix=`cat $here/../../modules/http/curl.prefix`
./start
sleep 2
-# For this test to work, add the test domain to your etc/hosts as follows:
-# 127.0.0.1 sca-store.com joe.sca-store.com joe.sca-store.com
-# then run ../../ubuntu/ip-redirect-all 80 8091
-
# Test HTTP GET
$curl_prefix/bin/curl http://joe.sca-store.com/ 2>/dev/null >tmp/index.html
diff tmp/index.html htdocs/domains/joe/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/ssl-start b/sca-cpp/trunk/samples/store-cluster/ssl-start
index 13a462bd49..f80bb075d6 100755
--- a/sca-cpp/trunk/samples/store-cluster/ssl-start
+++ b/sca-cpp/trunk/samples/store-cluster/ssl-start
@@ -19,15 +19,29 @@
set -x
+# Redirect traffic from ports 80, 443 and 444 to proxy1
+sudo ../../ubuntu/ip-redirect-all 80 8090
+sudo ../../ubuntu/ip-redirect-all 443 8091
+sudo ../../ubuntu/ip-redirect-all 444 8092
+
+# Redirect traffic from ports 80, 443 and 444 to proxy2
+#sudo ../../ubuntu/ip-redirect-all 80 8093
+#sudo ../../ubuntu/ip-redirect-all 443 8094
+#sudo ../../ubuntu/ip-redirect-all 444 8095
+
+# Redirect traffic from ports 119 and 563 to tunnel
+sudo ../../ubuntu/ip-redirect-all 119 8119
+sudo ../../ubuntu/ip-redirect-all 563 8563
+
# Generate SSL certificates
../../modules/http/ssl-ca-conf tmp/ssl sca-store.com
-../../modules/http/ssl-cert-conf tmp/ssl sca-store.com server
+../../modules/http/ssl-cert-conf tmp/ssl localhost server
../../modules/http/ssl-cert-conf tmp/ssl *.sca-store.com vhost
../../modules/http/ssl-cert-conf tmp/ssl sca-store.com proxy
-../../modules/http/ssl-cert-conf tmp/ssl sca-store.com tunnel
+../../modules/http/ssl-cert-conf tmp/ssl localhost tunnel
# Start an SSL tunnel
-./tunnel-ssl-conf tmp/tunnel 8119 8563
+./tunnel-ssl-conf tmp/tunnel 8119/119 8563/563
../../modules/http/httpd-start tmp/tunnel
sleep 1
@@ -74,20 +88,20 @@ sleep 1
../../modules/http/httpd-start tmp/sqldb3
# Start three app servers
-./server-ssl-conf tmp/server1 8101 8441
+./server-ssl-conf tmp/server1 8101/80 8441/443
../../modules/http/httpd-start tmp/server1
sleep 1
-./server-ssl-conf tmp/server2 8102 8442
+./server-ssl-conf tmp/server2 8102/80 8442/443
../../modules/http/httpd-start tmp/server2
sleep 1
-./server-ssl-conf tmp/server3 8103 8443
+./server-ssl-conf tmp/server3 8103/80 8443/443
../../modules/http/httpd-start tmp/server3
sleep 1
# Start two proxy balancers
-./proxy-ssl-conf tmp/proxy1 8091 8093
+./proxy-ssl-conf tmp/proxy1 8090/80 8091/443
../../modules/http/proxy-member-conf tmp/proxy1 localhost 8101
../../modules/http/proxy-ssl-member-conf tmp/proxy1 localhost 8441
../../modules/http/proxy-member-conf tmp/proxy1 localhost 8102
@@ -96,7 +110,7 @@ sleep 1
../../modules/http/proxy-ssl-member-conf tmp/proxy1 localhost 8443
../../modules/http/httpd-start tmp/proxy1
-./proxy-ssl-conf tmp/proxy2 8092 8094
+./proxy-ssl-conf tmp/proxy2 8093/80 8094/443
../../modules/http/proxy-member-conf tmp/proxy2 localhost 8101
../../modules/http/proxy-ssl-member-conf tmp/proxy2 localhost 8441
../../modules/http/proxy-member-conf tmp/proxy2 localhost 8102
@@ -105,15 +119,3 @@ sleep 1
../../modules/http/proxy-ssl-member-conf tmp/proxy2 localhost 8443
../../modules/http/httpd-start tmp/proxy2
-# Redirect traffic from ports 80 and 443 to proxy1
-#sudo ../../ubuntu/ip-redirect-all 80 8091
-#sudo ../../ubuntu/ip-redirect-all 443 8093
-
-# Redirect traffic from ports 80 and 443 to proxy2
-#sudo ../../ubuntu/ip-redirect-all 80 8092
-#sudo ../../ubuntu/ip-redirect-all 443 8094
-
-# Redirect traffic from ports 119 and 563 to tunnel
-#sudo ../../ubuntu/ip-redirect-all 119 8119
-#sudo ../../ubuntu/ip-redirect-all 563 8563
-
diff --git a/sca-cpp/trunk/samples/store-cluster/start b/sca-cpp/trunk/samples/store-cluster/start
index 98293d3f98..67434d6a0e 100755
--- a/sca-cpp/trunk/samples/store-cluster/start
+++ b/sca-cpp/trunk/samples/store-cluster/start
@@ -19,6 +19,12 @@
set -x
+# Redirect traffic from port 80 to proxy1
+sudo ../../ubuntu/ip-redirect-all 80 8090
+
+# Redirect traffic from port 80 to proxy2
+#sudo ../../ubuntu/ip-redirect-all 80 8091
+
# Start scribe logging
../../components/log/scribed-central-conf tmp/monitor
../../components/log/scribed-client-conf tmp/monitor localhost
@@ -71,9 +77,3 @@ sleep 1
../../modules/http/proxy-member-conf tmp/proxy2 localhost 8103
../../modules/http/httpd-start tmp/proxy2
-# Redirect traffic from port 80 to proxy1
-#sudo ../../ubuntu/ip-redirect-all 80 8090
-
-# Redirect traffic from port 80 to proxy2
-#sudo ../../ubuntu/ip-redirect-all 80 8091
-
diff --git a/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf b/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
index ef3074691a..7a9a8ad305 100755
--- a/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
@@ -24,7 +24,9 @@ sslport=$3
set -x
# Configure an SSL-enabled tunnel server
-../../modules/http/httpd-conf $root sca-store.com $port/119 $root/htdocs
+../../modules/http/httpd-conf $root sca-store.com $port $root/htdocs
+../../modules/http/httpd-event-conf $root
tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
-../../modules/http/httpd-ssl-conf $root $sslport/563
+../../modules/http/httpd-ssl-conf $root $sslport
+../../modules/http/cert-auth-conf $root
diff --git a/sca-cpp/trunk/samples/store-python/redirect b/sca-cpp/trunk/samples/store-python/redirect
deleted file mode 100755
index f73b342bf8..0000000000
--- a/sca-cpp/trunk/samples/store-python/redirect
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Redirect ports 80 and 443
-../../ubuntu/ip-redirect-all 80 8090
-../../ubuntu/ip-redirect-all 443 8453
-
diff --git a/sca-cpp/trunk/samples/store-python/uec2-start b/sca-cpp/trunk/samples/store-python/uec2-start
index af98e1ac7f..84c170e596 100755
--- a/sca-cpp/trunk/samples/store-python/uec2-start
+++ b/sca-cpp/trunk/samples/store-python/uec2-start
@@ -24,7 +24,7 @@ else
host="localhost"
fi
-# Ports 80, 443, 8090, 8453 need to be open
+# Ports 80, 443, 444, 8090, 8453, 8454 need to be open
sudo ../../ubuntu/ip-redirect-all 80 8090
sudo ../../ubuntu/ip-redirect-all 443 8453
diff --git a/sca-cpp/trunk/samples/store-vhost/uec2-start b/sca-cpp/trunk/samples/store-vhost/uec2-start
index c4720cafd5..b8a267d617 100755
--- a/sca-cpp/trunk/samples/store-vhost/uec2-start
+++ b/sca-cpp/trunk/samples/store-vhost/uec2-start
@@ -25,7 +25,7 @@ else
host="sca-store.com"
fi
-# Ports 80, 443, 8090, 8453 need to be open
+# Ports 80, 443, 444, 8090, 8453, 8454 need to be open
sudo ../../ubuntu/ip-redirect-all 80 8090
sudo ../../ubuntu/ip-redirect-all 443 8453