From ec39961fa92cf9d2882ec61fd525b24a00b0e205 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sat, 26 Feb 2011 20:59:49 +0000 Subject: 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 --- sca-cpp/trunk/modules/http/vhost-conf | 14 +++++--------- sca-cpp/trunk/modules/http/vhost-ssl-conf | 13 ++++++++++++- 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'sca-cpp/trunk/modules') 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 ServerName http://vhost.$host:$pport ServerAlias *.$host -VirtualDocumentRoot $htdocs/domains/%1/ +VirtualDocumentRoot $vroot/%1/$vhtdocs/ Include conf/dvhost.conf # Allow access to document root - + Options FollowSymLinks AuthType None Require all granted -# Allow access to root location - -Options FollowSymLinks -AuthType None -Require all granted - - 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 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 + +Options FollowSymLinks +AuthType None +Require all granted + + -- cgit v1.2.3