summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/http/httpd-ssl-conf
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-11-12 19:17:31 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-11-12 19:17:31 +0000
commit1fd773dda89c321d5558bcfefcc75742375d9541 (patch)
treeef86914ce4b276de211929a91d7675bb20c1b1a4 /sca-cpp/trunk/modules/http/httpd-ssl-conf
parent7112b1604316c4b97fd15fccc586e2ac27dd0677 (diff)
Upgrade to HTTPD 2.3.15-beta.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1201308 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/http/httpd-ssl-conf')
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-ssl-conf17
1 files changed, 14 insertions, 3 deletions
diff --git a/sca-cpp/trunk/modules/http/httpd-ssl-conf b/sca-cpp/trunk/modules/http/httpd-ssl-conf
index 9567c44cf1..50da9e6b54 100755
--- a/sca-cpp/trunk/modules/http/httpd-ssl-conf
+++ b/sca-cpp/trunk/modules/http/httpd-ssl-conf
@@ -31,6 +31,11 @@ pport=`$here/httpd-addr pport $gport`
sslpport=`$here/httpd-addr pport $2`
sslport=`$here/httpd-addr listen $2`
sslvhost=`$here/httpd-addr vhost $2`
+if [ "$sslpport" = "443" ]; then
+ sslpportsuffix=""
+else
+ sslpportsuffix=":$sslpport"
+fi
htdocs=`echo $conf | awk '{ print $8 }'`
mkdir -p $htdocs
@@ -58,7 +63,13 @@ Listen $sslport
# HTTPS virtual host
<VirtualHost $sslvhost>
-ServerName https://$host:$sslpport
+ServerName https://$host$sslpportsuffix
+
+<Location />
+RewriteEngine on
+RewriteCond %{HTTP_HOST} !^$host [NC]
+RewriteRule .* https://$host$sslpportsuffix%{REQUEST_URI} [R]
+</Location>
Include conf/svhost-ssl.conf
@@ -86,7 +97,7 @@ cat >>$root/conf/svhost.conf <<EOF
RewriteEngine on
RewriteCond %{SERVER_PORT} ^$port$ [OR]
RewriteCond %{SERVER_PORT} ^$pport$
-RewriteRule .* https://$host:$sslpport%{REQUEST_URI} [R,L]
+RewriteRule .* https://$host$sslpportsuffix%{REQUEST_URI} [R]
</Location>
EOF
@@ -98,7 +109,7 @@ cat >>$root/conf/dvhost.conf <<EOF
RewriteEngine on
RewriteCond %{SERVER_PORT} ^$port$ [OR]
RewriteCond %{SERVER_PORT} ^$pport$
-RewriteRule .* https://%{SERVER_NAME}:$sslpport%{REQUEST_URI} [R,L]
+RewriteRule .* https://%{SERVER_NAME}$sslpportsuffix%{REQUEST_URI} [R]
</Location>
EOF