summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http/vhost-ssl-conf
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/http/vhost-ssl-conf')
-rwxr-xr-xsca-cpp/trunk/modules/http/vhost-ssl-conf16
1 files changed, 9 insertions, 7 deletions
diff --git a/sca-cpp/trunk/modules/http/vhost-ssl-conf b/sca-cpp/trunk/modules/http/vhost-ssl-conf
index e6801248c4..433f26e6b3 100755
--- a/sca-cpp/trunk/modules/http/vhost-ssl-conf
+++ b/sca-cpp/trunk/modules/http/vhost-ssl-conf
@@ -20,24 +20,26 @@
# 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
+ssladdr=`echo $sslconf | awk '{ print $6 }'`
+sslport=`$here/httpd-addr port $ssladdr`
+sslpport=`$here/httpd-addr pport $ssladdr`
+sslvhost=`$here/httpd-addr vhost $ssladdr`
+
htdocs=`echo $conf | awk '{ print $8 }'`
htdocs=`readlink -f $htdocs`
cat >>$root/conf/httpd.conf <<EOF
# Generated by: vhost-ssl-conf $*
# Enable mass dynamic virtual hosting over HTTPS
-NameVirtualHost *:$sslport
+NameVirtualHost $sslvhost
SSLStrictSNIVHostCheck Off
-<VirtualHost *:$sslport>
+<VirtualHost $sslvhost>
ServerName https://vhost.$host:$sslpport
ServerAlias *.$host
VirtualDocumentRoot $htdocs/domains/%1/