From fe93d86e5572870b2e4004c7788da8320a28de3d Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Wed, 28 Jul 2010 09:50:12 +0000 Subject: Refactor and cleanup some of the config scripts. Add a sample using mod_proxy_balancer to distribute requests across three servers. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@980009 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/components/log/scribed-central-conf | 2 + sca-cpp/trunk/components/log/scribed-client-conf | 2 + sca-cpp/trunk/components/webservice/axis2-conf | 1 + sca-cpp/trunk/configure.ac | 1 + sca-cpp/trunk/modules/http/Makefile.am | 6 +- sca-cpp/trunk/modules/http/httpd-conf | 43 +++--- sca-cpp/trunk/modules/http/httpd-ssl-conf | 68 +++++---- sca-cpp/trunk/modules/http/proxy-conf | 40 ++++++ sca-cpp/trunk/modules/http/proxy-member-conf | 33 +++++ sca-cpp/trunk/modules/http/proxy-ssl-conf | 70 +++++++++ sca-cpp/trunk/modules/http/proxy-ssl-member-conf | 33 +++++ sca-cpp/trunk/modules/http/proxy-test | 37 +++++ sca-cpp/trunk/modules/http/ssl-ca-conf | 1 + sca-cpp/trunk/modules/http/ssl-cert-conf | 6 + sca-cpp/trunk/modules/http/ssl-ls | 25 ++++ sca-cpp/trunk/modules/http/vhost-conf | 47 ++++++ sca-cpp/trunk/modules/http/vhost-ssl-conf | 49 +++++++ sca-cpp/trunk/modules/java/java-conf | 1 + .../trunk/modules/openid/htdocs/logout/index.html | 3 +- sca-cpp/trunk/modules/openid/openid-conf | 8 +- sca-cpp/trunk/modules/openid/openid-step2-conf | 10 +- sca-cpp/trunk/modules/openid/start-test | 4 +- sca-cpp/trunk/modules/python/python-conf | 1 + sca-cpp/trunk/modules/server/cpp-conf | 1 + sca-cpp/trunk/modules/server/mod-eval.hpp | 6 +- sca-cpp/trunk/modules/server/scheme-conf | 1 + sca-cpp/trunk/modules/server/server-conf | 51 +++++++ sca-cpp/trunk/samples/Makefile.am | 2 +- sca-cpp/trunk/samples/store-cluster/Makefile.am | 36 +++++ .../domains/jane/currency-converter.py | 29 ++++ .../store-cluster/domains/jane/fruits-catalog.py | 30 ++++ .../store-cluster/domains/jane/shopping-cart.py | 75 ++++++++++ .../store-cluster/domains/jane/store.composite | 69 +++++++++ .../samples/store-cluster/domains/jane/store.py | 40 ++++++ .../domains/joe/currency-converter.py | 29 ++++ .../store-cluster/domains/joe/fruits-catalog.py | 30 ++++ .../store-cluster/domains/joe/shopping-cart.py | 75 ++++++++++ .../store-cluster/domains/joe/store.composite | 69 +++++++++ .../samples/store-cluster/domains/joe/store.py | 40 ++++++ .../store-cluster/htdocs/domains/jane/index.html | 157 +++++++++++++++++++++ .../store-cluster/htdocs/domains/joe/index.html | 157 +++++++++++++++++++++ .../trunk/samples/store-cluster/htdocs/index.html | 34 +++++ sca-cpp/trunk/samples/store-cluster/server-test | 62 ++++++++ sca-cpp/trunk/samples/store-cluster/ssl-start | 113 +++++++++++++++ sca-cpp/trunk/samples/store-cluster/start | 83 +++++++++++ sca-cpp/trunk/samples/store-cluster/stop | 25 ++++ sca-cpp/trunk/samples/store-cpp/ssl-start | 2 +- sca-cpp/trunk/samples/store-java/ssl-start | 2 +- sca-cpp/trunk/samples/store-nosql/ssl-start | 2 +- sca-cpp/trunk/samples/store-python/redirect | 5 +- sca-cpp/trunk/samples/store-python/ssl-start | 2 +- sca-cpp/trunk/samples/store-python/uec2-start | 6 +- sca-cpp/trunk/samples/store-scheme/ssl-start | 2 +- sca-cpp/trunk/samples/store-sql/ssl-start | 2 +- sca-cpp/trunk/samples/store-vhost/ssl-start | 6 +- sca-cpp/trunk/samples/store-vhost/start | 3 +- sca-cpp/trunk/samples/store-vhost/uec2-start | 10 +- sca-cpp/trunk/ubuntu/Makefile.am | 2 +- sca-cpp/trunk/ubuntu/ip-redirect | 25 ++-- sca-cpp/trunk/ubuntu/ip-redirect-all | 26 ++++ sca-cpp/trunk/ubuntu/uec2-bin-all-image | 23 +++ sca-cpp/trunk/ubuntu/uec2-dev-all-image | 23 +++ 62 files changed, 1735 insertions(+), 111 deletions(-) create mode 100755 sca-cpp/trunk/modules/http/proxy-conf create mode 100755 sca-cpp/trunk/modules/http/proxy-member-conf create mode 100755 sca-cpp/trunk/modules/http/proxy-ssl-conf create mode 100755 sca-cpp/trunk/modules/http/proxy-ssl-member-conf create mode 100755 sca-cpp/trunk/modules/http/proxy-test create mode 100755 sca-cpp/trunk/modules/http/ssl-ls create mode 100755 sca-cpp/trunk/modules/http/vhost-conf create mode 100755 sca-cpp/trunk/modules/http/vhost-ssl-conf create mode 100644 sca-cpp/trunk/samples/store-cluster/Makefile.am create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/jane/currency-converter.py create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/jane/fruits-catalog.py create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/jane/shopping-cart.py create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/jane/store.composite create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/jane/store.py create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/joe/currency-converter.py create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/joe/fruits-catalog.py create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/joe/shopping-cart.py create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/joe/store.composite create mode 100644 sca-cpp/trunk/samples/store-cluster/domains/joe/store.py create mode 100644 sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/index.html create mode 100644 sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/index.html create mode 100644 sca-cpp/trunk/samples/store-cluster/htdocs/index.html create mode 100755 sca-cpp/trunk/samples/store-cluster/server-test create mode 100755 sca-cpp/trunk/samples/store-cluster/ssl-start create mode 100755 sca-cpp/trunk/samples/store-cluster/start create mode 100755 sca-cpp/trunk/samples/store-cluster/stop create mode 100755 sca-cpp/trunk/ubuntu/ip-redirect-all create mode 100755 sca-cpp/trunk/ubuntu/uec2-bin-all-image create mode 100755 sca-cpp/trunk/ubuntu/uec2-dev-all-image (limited to 'sca-cpp') diff --git a/sca-cpp/trunk/components/log/scribed-central-conf b/sca-cpp/trunk/components/log/scribed-central-conf index 458cbdebca..3bb9c29c85 100755 --- a/sca-cpp/trunk/components/log/scribed-central-conf +++ b/sca-cpp/trunk/components/log/scribed-central-conf @@ -19,6 +19,7 @@ # Generate a Scribe central conf here=`readlink -f $0`; here=`dirname $here` +mkdir -p $1 root=`readlink -f $1` mkdir -p $root/scribe/conf @@ -26,6 +27,7 @@ mkdir -p $root/scribe/logs/central mkdir -p $root/scribe/logs/central-secondary cat >$root/scribe/conf/scribe-central.conf <$root/scribe/conf/scribe-client.conf <>$root/conf/httpd.conf <curl.prefix -dist_noinst_SCRIPTS = httpd-test http-test +dist_noinst_SCRIPTS = httpd-test http-test proxy-test noinst_PROGRAMS = curl-test curl-get -TESTS = httpd-test http-test +TESTS = httpd-test http-test proxy-test diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf index 70c0b295af..149bc56c4d 100755 --- a/sca-cpp/trunk/modules/http/httpd-conf +++ b/sca-cpp/trunk/modules/http/httpd-conf @@ -19,6 +19,7 @@ # Generate a minimal HTTPD configuration here=`readlink -f $0`; here=`dirname $here` +mkdir -p $1 root=`readlink -f $1` host=$2 port=`echo $3 | awk -F "/" '{ print $1 }'` @@ -26,19 +27,20 @@ pport=`echo $3 | awk -F "/" '{ print $2 }'` if [ "$pport" = "" ]; then pport=$port fi +mkdir -p $4 htdocs=`readlink -f $4` user=`id -un` group=`id -gn` modules_prefix=`cat $here/httpd-modules.prefix` -vhost=$5 mkdir -p $root mkdir -p $root/logs mkdir -p $root/conf cat >$root/conf/httpd.conf < Options FollowSymLinks +Order deny,allow Allow from all -# Setup HTTP virtual hosts +# Setup HTTP virtual host Listen $port ServerName http://$host:$pport -UseCanonicalName Off + +Include conf/svhost.conf EOF -# Generate mass dynamic virtual hosting configuration -if [ "$vhost" = "vhost" ]; then - -cat >>$root/conf/httpd.conf < -ServerName http://vhost.$host:$pport -ServerAlias *.$host +# Generate vhost configuration +cat >$root/conf/vhost.conf < -# Isolate virtual host based requests -MaxRequestsPerChild 1 +EOF + +cat >$root/conf/svhost.conf <$root/conf/dvhost.conf < ServerName https://$host:$sslpport -UseCanonicalName Off -# Enable SSL -Include conf/ssl-vhost.conf +Include conf/ssl-svhost.conf # Allow the server admin to view the server status SetHandler server-status HostnameLookups on Deny from All -Allow from localhost -Allow from $host +Allow from all Require user admin @@ -81,13 +77,14 @@ Require user admin # Report extended server status ExtendedStatus On -# Route all wiring through HTTPS -SCAWiringServerName https://$host:$sslpport - EOF -# Generate VirtualHost SSL configuration +# Generate HTTPS vhost configuration cat >$root/conf/ssl-vhost.conf <$root/conf/ssl-svhost.conf <>$root/conf/httpd.conf < -ServerName https://vhost.$host:$sslpport -ServerAlias *.$host -UseCanonicalName Off -VirtualDocumentRoot $htdocs/domains/%1/ +EOF -# Enable SSL +cat >$root/conf/ssl-dvhost.conf < EOF -fi - # Create test users for HTTP basic authentication $httpd_prefix/bin/htpasswd -bc $root/conf/httpd.passwd test test 2>/dev/null $httpd_prefix/bin/htpasswd -b $root/conf/httpd.passwd admin admin 2>/dev/null diff --git a/sca-cpp/trunk/modules/http/proxy-conf b/sca-cpp/trunk/modules/http/proxy-conf new file mode 100755 index 0000000000..4970950623 --- /dev/null +++ b/sca-cpp/trunk/modules/http/proxy-conf @@ -0,0 +1,40 @@ +#!/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. + +# Generate a minimal HTTPD proxy balancer configuration +here=`readlink -f $0`; here=`dirname $here` +root=`readlink -f $1` + +cat >>$root/conf/vhost.conf < +Order deny,allow +Allow from all +ProxySet lbmethod=byrequests + + +EOF + diff --git a/sca-cpp/trunk/modules/http/proxy-member-conf b/sca-cpp/trunk/modules/http/proxy-member-conf new file mode 100755 index 0000000000..73c448c065 --- /dev/null +++ b/sca-cpp/trunk/modules/http/proxy-member-conf @@ -0,0 +1,33 @@ +#!/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. + +# Add a proxy balancer member +here=`readlink -f $0`; here=`dirname $here` +root=`readlink -f $1` +host=$2 +port=`echo $3 | awk -F "/" '{ print $1 }'` + +cat >>$root/conf/vhost.conf <>$root/conf/ssl-vhost.conf < +Order deny,allow +Allow from all +ProxySet lbmethod=byrequests + + +# Enable balancer manager + +SetHandler balancer-manager +HostnameLookups on +Deny from all +Allow from all +Require user admin + + +EOF + +cat >>$root/conf/ssl-svhost.conf <>$root/conf/ssl-dvhost.conf <>$root/conf/ssl-vhost.conf <> $root/conf/$certname.pem + diff --git a/sca-cpp/trunk/modules/http/ssl-ls b/sca-cpp/trunk/modules/http/ssl-ls new file mode 100755 index 0000000000..71d40719ca --- /dev/null +++ b/sca-cpp/trunk/modules/http/ssl-ls @@ -0,0 +1,25 @@ +#!/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. + +# Generate a test certification authority certificate +here=`readlink -f $0`; here=`dirname $here` +root=`readlink -f $1` + +ls $root/conf/*.crt $root/conf/*.key $root/conf/*.pem $root/conf/*.p12 2>/dev/null + diff --git a/sca-cpp/trunk/modules/http/vhost-conf b/sca-cpp/trunk/modules/http/vhost-conf new file mode 100755 index 0000000000..e49a1cd415 --- /dev/null +++ b/sca-cpp/trunk/modules/http/vhost-conf @@ -0,0 +1,47 @@ +#!/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. + +# Generate mass dynamic virtual hosting configuration +here=`readlink -f $0`; here=`dirname $here` +root=`readlink -f $1` +conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` +host=`echo $conf | awk '{ print $6 }'` +port=`echo $conf | awk '{ print $7 }' | awk -F "/" '{ print $1 }'` +pport=`echo $conf | awk '{ print $7 }' | awk -F "/" '{ print $2 }'` +if [ "$pport" = "" ]; then + pport=$port +fi +htdocs=`echo $conf | awk '{ print $8 }'` +htdocs=`readlink -f $htdocs` + +cat >>$root/conf/httpd.conf < +ServerName http://vhost.$host:$pport +ServerAlias *.$host +VirtualDocumentRoot $htdocs/domains/%1/ + +Include conf/dvhost.conf + + +EOF + diff --git a/sca-cpp/trunk/modules/http/vhost-ssl-conf b/sca-cpp/trunk/modules/http/vhost-ssl-conf new file mode 100755 index 0000000000..8a660278a3 --- /dev/null +++ b/sca-cpp/trunk/modules/http/vhost-ssl-conf @@ -0,0 +1,49 @@ +#!/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. + +# Generate mass dynamic virtual hosting configuration +here=`readlink -f $0`; here=`dirname $here` +root=`readlink -f $1` +conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` +host=`echo $conf | awk '{ print $6 }'` +sslconf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"` +sslport=`echo $sslconf | awk '{ print $6 }' | awk -F "/" '{ print $1 }'` +sslpport=`echo $sslconf | awk '{ print $6 }' | awk -F "/" '{ print $2 }'` +if [ "$sslpport" = "" ]; then + sslpport=$sslport +fi +htdocs=`echo $conf | awk '{ print $8 }'` +htdocs=`readlink -f $htdocs` + +cat >>$root/conf/httpd.conf < +ServerName https://vhost.$host:$sslpport +ServerAlias *.$host +VirtualDocumentRoot $htdocs/domains/%1/ + +Include conf/ssl-dvhost.conf + + +EOF + diff --git a/sca-cpp/trunk/modules/java/java-conf b/sca-cpp/trunk/modules/java/java-conf index 4c03035ca4..e0690d50ec 100755 --- a/sca-cpp/trunk/modules/java/java-conf +++ b/sca-cpp/trunk/modules/java/java-conf @@ -22,6 +22,7 @@ here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` cat >>$root/conf/httpd.conf <

Sign out

-
+ + + + + + + +

Jane's Store

+
+

Catalog

+ +
+
+ + +
+ +

Your Shopping Cart

+
+
+
+
+
+ + +(feed) +
+
+ + + diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/index.html b/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/index.html new file mode 100644 index 0000000000..e8b722d0d6 --- /dev/null +++ b/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/index.html @@ -0,0 +1,157 @@ + + + +Store + + + + + + + + +

Joe's Store

+
+

Catalog

+
+
+
+ +
+
+ +

Your Shopping Cart

+
+
+
+
+
+ + +(feed) +
+
+ + + diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/index.html b/sca-cpp/trunk/samples/store-cluster/htdocs/index.html new file mode 100644 index 0000000000..21e32d7efc --- /dev/null +++ b/sca-cpp/trunk/samples/store-cluster/htdocs/index.html @@ -0,0 +1,34 @@ + + + +Store + + + +

Store

+

For this sample to work, add the sample domain to your /etc/hosts as follows:
+127.0.0.1 sca-store.com jane.sca-store.com joe.sca-store.com

+ +

+

Jane's store at jane.sca-store.com +
Joe's store at joe.sca-store.com

+ + + diff --git a/sca-cpp/trunk/samples/store-cluster/server-test b/sca-cpp/trunk/samples/store-cluster/server-test new file mode 100755 index 0000000000..2f657c4ce5 --- /dev/null +++ b/sca-cpp/trunk/samples/store-cluster/server-test @@ -0,0 +1,62 @@ +#!/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. + +echo "Testing..." +here=`readlink -f $0`; here=`dirname $here` +curl_prefix=`cat $here/../../modules/http/curl.prefix` + +# Setup +./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 +rc=$? + +# Test Catalog +if [ "$rc" = "0" ]; then + $curl_prefix/bin/curl http://joe.sca-store.com/references/Store/catalog -X POST -H "Content-type: application/json-rpc" --data @../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt 2>/dev/null + diff tmp/getcatalog-result.txt ../store-cpp/htdocs/test/getcatalog-result.txt + rc=$? +fi + +# Test Shopping Cart +if [ "$rc" = "0" ]; then + $curl_prefix/bin/curl http://joe.sca-store.com/references/Store/shoppingCart -X POST -H "Content-type: application/atom+xml" --data @../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null + rc=$? +fi +if [ "$rc" = "0" ]; then + $curl_prefix/bin/curl http://joe.sca-store.com/references/Store/shoppingCart >tmp/shopping-cart-feed.xml 2>/dev/null + grep "3.55" tmp/shopping-cart-feed.xml >/dev/null + rc=$? +fi + +# Cleanup +./stop +sleep 2 + +if [ "$rc" = "0" ]; then + echo "OK" +fi +return $rc diff --git a/sca-cpp/trunk/samples/store-cluster/ssl-start b/sca-cpp/trunk/samples/store-cluster/ssl-start new file mode 100755 index 0000000000..4acd41bc2d --- /dev/null +++ b/sca-cpp/trunk/samples/store-cluster/ssl-start @@ -0,0 +1,113 @@ +#!/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. + +# 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 *.sca-store.com vhost + +# Start three identical app servers +../../modules/http/httpd-conf tmp/server1 sca-store.com 8101/80 htdocs +../../modules/http/vhost-conf tmp/server1 +cp `../../modules/http/ssl-ls tmp/ssl` tmp/server1/conf +../../modules/http/httpd-ssl-conf tmp/server1 8441/443 +../../modules/http/vhost-ssl-conf tmp/server1 +../../modules/server/server-conf tmp/server1 +../../modules/python/python-conf tmp/server1 +cat >>tmp/server1/conf/httpd.conf <>tmp/server2/conf/httpd.conf <>tmp/server3/conf/httpd.conf <>tmp/server1/conf/httpd.conf <>tmp/server2/conf/httpd.conf <>tmp/server3/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <>tmp/conf/httpd.conf <