diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-26 20:59:49 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-26 20:59:49 +0000 |
commit | ec39961fa92cf9d2882ec61fd525b24a00b0e205 (patch) | |
tree | 7c75554f3252111a9701de72a3b42b0a93841004 /sca-cpp/trunk/modules | |
parent | 7c018c6fb691b65ac1cb181a95f5766e2933eb3c (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
Diffstat (limited to 'sca-cpp/trunk/modules')
-rwxr-xr-x | sca-cpp/trunk/modules/http/vhost-conf | 14 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/vhost-ssl-conf | 13 |
2 files changed, 17 insertions, 10 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> |