summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-02-26 20:59:49 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-02-26 20:59:49 +0000
commitec39961fa92cf9d2882ec61fd525b24a00b0e205 (patch)
tree7c75554f3252111a9701de72a3b42b0a93841004
parent7c018c6fb691b65ac1cb181a95f5766e2933eb3c (diff)
Move virtual host htdocs under their corresponding virtual host contribution directory.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1074925 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xsca-cpp/trunk/modules/http/vhost-conf14
-rwxr-xr-xsca-cpp/trunk/modules/http/vhost-ssl-conf13
-rw-r--r--sca-cpp/trunk/samples/store-cluster/Makefile.am2
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/index.html (renamed from sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/index.html)0
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html (renamed from sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/login/index.html)0
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html (renamed from sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/logout/index.html)0
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/index.html (renamed from sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/index.html)0
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html (renamed from sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/login/index.html)0
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html (renamed from sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/logout/index.html)0
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-ssl-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-ssl-conf2
-rw-r--r--sca-cpp/trunk/samples/store-vhost/Makefile.am2
-rw-r--r--sca-cpp/trunk/samples/store-vhost/domains/jane/htdocs/index.html (renamed from sca-cpp/trunk/samples/store-vhost/htdocs/domains/jane/index.html)0
-rw-r--r--sca-cpp/trunk/samples/store-vhost/domains/joe/htdocs/index.html (renamed from sca-cpp/trunk/samples/store-vhost/htdocs/domains/joe/index.html)0
-rwxr-xr-xsca-cpp/trunk/samples/store-vhost/ssl-start2
-rwxr-xr-xsca-cpp/trunk/samples/store-vhost/start2
-rwxr-xr-xsca-cpp/trunk/samples/store-vhost/uec2-start2
19 files changed, 26 insertions, 19 deletions
diff --git a/sca-cpp/trunk/modules/http/vhost-conf b/sca-cpp/trunk/modules/http/vhost-conf
index f45d448906..a36b195844 100755
--- a/sca-cpp/trunk/modules/http/vhost-conf
+++ b/sca-cpp/trunk/modules/http/vhost-conf
@@ -22,6 +22,9 @@ here=`readlink -f $0`; here=`dirname $here`
mkdir -p $1
root=`readlink -f $1`
+vroot=`readlink -f $2`
+vhtdocs=$3
+
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
addr=`echo $conf | awk '{ print $7 }'`
@@ -41,24 +44,17 @@ NameVirtualHost $vhost
<VirtualHost $vhost>
ServerName http://vhost.$host:$pport
ServerAlias *.$host
-VirtualDocumentRoot $htdocs/domains/%1/
+VirtualDocumentRoot $vroot/%1/$vhtdocs/
Include conf/dvhost.conf
# Allow access to document root
-<Directory "$htdocs">
+<Directory "$vroot">
Options FollowSymLinks
AuthType None
Require all granted
</Directory>
-# Allow access to root location
-<Location />
-Options FollowSymLinks
-AuthType None
-Require all granted
-</Location>
-
</VirtualHost>
EOF
diff --git a/sca-cpp/trunk/modules/http/vhost-ssl-conf b/sca-cpp/trunk/modules/http/vhost-ssl-conf
index 36b2a15412..314773a338 100755
--- a/sca-cpp/trunk/modules/http/vhost-ssl-conf
+++ b/sca-cpp/trunk/modules/http/vhost-ssl-conf
@@ -31,6 +31,10 @@ sslport=`$here/httpd-addr port $ssladdr`
sslpport=`$here/httpd-addr pport $ssladdr`
sslvhost=`$here/httpd-addr vhost $ssladdr`
+vhostconf=`cat $root/conf/httpd.conf | grep "# Generated by: vhost-conf"`
+vroot=`echo $vhostconf | awk '{ print $6 }'`; vroot=`readlink -f $vroot`
+vhtdocs=`echo $vhostconf | awk '{ print $7 }'`
+
htdocs=`echo $conf | awk '{ print $8 }'`
mkdir -p $htdocs
htdocs=`readlink -f $htdocs`
@@ -45,9 +49,16 @@ NameVirtualHost $sslvhost
<VirtualHost $sslvhost>
ServerName https://vhost.$host:$sslpport
ServerAlias *.$host
-VirtualDocumentRoot $htdocs/domains/%1/
+VirtualDocumentRoot $vroot/%1/$vhtdocs/
Include conf/dvhost-ssl.conf
+# Allow access to document root
+<Directory "$vroot">
+Options FollowSymLinks
+AuthType None
+Require all granted
+</Directory>
+
</VirtualHost>
diff --git a/sca-cpp/trunk/samples/store-cluster/Makefile.am b/sca-cpp/trunk/samples/store-cluster/Makefile.am
index e9aab86f10..f856e63c59 100644
--- a/sca-cpp/trunk/samples/store-cluster/Makefile.am
+++ b/sca-cpp/trunk/samples/store-cluster/Makefile.am
@@ -24,7 +24,7 @@ if WANT_QUEUE
dist_sample_SCRIPTS = start stop ssl-start ssl-stop proxy-conf proxy-ssl-conf server-conf server-ssl-conf tunnel-ssl-conf sqldb-master-conf sqldb-standby-conf
sampledir = $(prefix)/samples/store-cluster
-nobase_dist_sample_DATA = htdocs/*.html htdocs/*/*.html htdocs/domains/*/*.html htdocs/domains/*/*/*.html domains/*/*.py domains/*/*.composite shared/*.composite
+nobase_dist_sample_DATA = htdocs/*.html htdocs/*/*.html domains/*/htdocs/*.html domains/*/htdocs/*/*.html domains/*/*.py domains/*/*.composite shared/*.composite
dist_noinst_SCRIPTS = server-test
#TESTS = server-test
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/index.html b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/index.html
index 4cd219bc9c..4cd219bc9c 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/login/index.html b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html
index 4e3b5a2f61..4e3b5a2f61 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/login/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/login/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/logout/index.html b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html
index 37c2594ffb..37c2594ffb 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/jane/logout/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/jane/htdocs/logout/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/index.html b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/index.html
index c32dcd9d53..c32dcd9d53 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/login/index.html b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
index 4e3b5a2f61..4e3b5a2f61 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/login/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/login/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/logout/index.html b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html
index 4a025af225..4a025af225 100644
--- a/sca-cpp/trunk/samples/store-cluster/htdocs/domains/joe/logout/index.html
+++ b/sca-cpp/trunk/samples/store-cluster/domains/joe/htdocs/logout/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-conf b/sca-cpp/trunk/samples/store-cluster/proxy-conf
index b60e7ba7f9..215c25f2f7 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-conf
@@ -24,7 +24,7 @@ set -x
# Configure a proxy balancer
../../modules/http/httpd-conf $root sca-store.com $port/80 $root/htdocs
-../../modules/http/vhost-conf $root
+../../modules/http/vhost-conf $root $root/domains htdocs
../../modules/http/proxy-conf $root
../../modules/http/httpd-event-conf $root
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
index fc329f0d18..b8d202049b 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
@@ -25,7 +25,7 @@ set -x
# Configure an SSL-enabled proxy balancer
../../modules/http/httpd-conf $root sca-store.com $port $root/htdocs
-../../modules/http/vhost-conf $root
+../../modules/http/vhost-conf $root $root/domains htdocs
../../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
diff --git a/sca-cpp/trunk/samples/store-cluster/server-conf b/sca-cpp/trunk/samples/store-cluster/server-conf
index d274dd3d17..babf2f2ef3 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-conf
+++ b/sca-cpp/trunk/samples/store-cluster/server-conf
@@ -24,7 +24,7 @@ set -x
# Configure an app server
../../modules/http/httpd-conf $root sca-store.com $port/80 htdocs
-../../modules/http/vhost-conf $root
+../../modules/http/vhost-conf $root domains htdocs
../../modules/server/server-conf $root
../../modules/python/python-conf $root
cat >>$root/conf/httpd.conf <<EOF
diff --git a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
index 612dc6be47..56ca5edc8c 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
@@ -25,7 +25,7 @@ set -x
# Configure an SSL-enabled app server
../../modules/http/httpd-conf $root sca-store.com $port htdocs
-../../modules/http/vhost-conf $root
+../../modules/http/vhost-conf $root domains htdocs
tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
../../modules/http/httpd-ssl-conf $root $sslport
diff --git a/sca-cpp/trunk/samples/store-vhost/Makefile.am b/sca-cpp/trunk/samples/store-vhost/Makefile.am
index 6c7dba1808..71dca3621d 100644
--- a/sca-cpp/trunk/samples/store-vhost/Makefile.am
+++ b/sca-cpp/trunk/samples/store-vhost/Makefile.am
@@ -20,7 +20,7 @@ if WANT_PYTHON
dist_sample_SCRIPTS = start stop ssl-start uec2-start
sampledir = $(prefix)/samples/store-vhost
-nobase_dist_sample_DATA = htdocs/*.html htdocs/domains/*/*.html domains/*/*.py domains/*/*.composite shared/*.composite
+nobase_dist_sample_DATA = htdocs/*.html domains/*/htdocs/*.html domains/*/*.py domains/*/*.composite shared/*.composite
dist_noinst_SCRIPTS = server-test
#TESTS = server-test
diff --git a/sca-cpp/trunk/samples/store-vhost/htdocs/domains/jane/index.html b/sca-cpp/trunk/samples/store-vhost/domains/jane/htdocs/index.html
index 4cd219bc9c..4cd219bc9c 100644
--- a/sca-cpp/trunk/samples/store-vhost/htdocs/domains/jane/index.html
+++ b/sca-cpp/trunk/samples/store-vhost/domains/jane/htdocs/index.html
diff --git a/sca-cpp/trunk/samples/store-vhost/htdocs/domains/joe/index.html b/sca-cpp/trunk/samples/store-vhost/domains/joe/htdocs/index.html
index c32dcd9d53..c32dcd9d53 100644
--- a/sca-cpp/trunk/samples/store-vhost/htdocs/domains/joe/index.html
+++ b/sca-cpp/trunk/samples/store-vhost/domains/joe/htdocs/index.html
diff --git a/sca-cpp/trunk/samples/store-vhost/ssl-start b/sca-cpp/trunk/samples/store-vhost/ssl-start
index 6f715afb89..ddff91eafb 100755
--- a/sca-cpp/trunk/samples/store-vhost/ssl-start
+++ b/sca-cpp/trunk/samples/store-vhost/ssl-start
@@ -24,7 +24,7 @@
../../modules/http/ssl-cert-conf tmp sca-store.com server
../../modules/http/ssl-cert-conf tmp *.sca-store.com vhost
../../modules/http/httpd-conf tmp sca-store.com 8090 htdocs
-../../modules/http/vhost-conf tmp
+../../modules/http/vhost-conf tmp domains htdocs
../../modules/http/httpd-ssl-conf tmp 8453
../../modules/http/vhost-ssl-conf tmp
../../modules/http/basic-auth-conf tmp
diff --git a/sca-cpp/trunk/samples/store-vhost/start b/sca-cpp/trunk/samples/store-vhost/start
index 16ffe351ec..c8bb6854f8 100755
--- a/sca-cpp/trunk/samples/store-vhost/start
+++ b/sca-cpp/trunk/samples/store-vhost/start
@@ -18,7 +18,7 @@
# under the License.
../../modules/http/httpd-conf tmp sca-store.com 8090 htdocs
-../../modules/http/vhost-conf tmp
+../../modules/http/vhost-conf tmp domains htdocs
../../modules/server/server-conf tmp
../../modules/python/python-conf tmp
cat >>tmp/conf/httpd.conf <<EOF
diff --git a/sca-cpp/trunk/samples/store-vhost/uec2-start b/sca-cpp/trunk/samples/store-vhost/uec2-start
index b8a267d617..e8b30af0dc 100755
--- a/sca-cpp/trunk/samples/store-vhost/uec2-start
+++ b/sca-cpp/trunk/samples/store-vhost/uec2-start
@@ -33,7 +33,7 @@ sudo ../../ubuntu/ip-redirect-all 443 8453
../../modules/http/ssl-cert-conf tmp $host server
../../modules/http/ssl-cert-conf tmp "*.$host" vhost
../../modules/http/httpd-conf tmp $host 8090/80 htdocs
-../../modules/http/vhost-conf tmp
+../../modules/http/vhost-conf tmp domains htdocs
../../modules/http/httpd-ssl-conf tmp 8453/443
../../modules/http/vhost-ssl-conf tmp
../../modules/server/server-conf tmp