summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/edit/ssl-start
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-04-04 08:46:08 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-04-04 08:46:08 +0000
commit038525403ebcc1d69436adad9bc1cfabb371dae1 (patch)
tree429e397cb6b10f1d05410e5b42f2630c21083281 /sca-cpp/trunk/modules/edit/ssl-start
parent37104d47a3ce5234ff708588b68e8d9cbd13131d (diff)
Fix performance and security issues reported by pagespeed and skipfish.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1088508 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rwxr-xr-xsca-cpp/trunk/modules/edit/ssl-start29
1 files changed, 24 insertions, 5 deletions
diff --git a/sca-cpp/trunk/modules/edit/ssl-start b/sca-cpp/trunk/modules/edit/ssl-start
index def40de019..36bef12413 100755
--- a/sca-cpp/trunk/modules/edit/ssl-start
+++ b/sca-cpp/trunk/modules/edit/ssl-start
@@ -54,19 +54,35 @@ EOF
# Configure app home pages
cat >>tmp/conf/dvhost-ssl.conf <<EOF
-# Redirect to app home page
-RewriteEngine On
-RewriteRule ^/$ /index.html [R]
-
-# Error pages
+# App error pages
ErrorDocument 404 /public/notfound.html
ErrorDocument 401 /public/notauth.html
ErrorDocument 500 /public/oops.html
+# Redirect www to main home page
+RewriteEngine on
+RewriteCond %{HTTP_HOST} ^www\.sca-store\.com [NC]
+RewriteCond %{SERVER_PORT} !^443$
+RewriteRule .* https://sca-store.com:%{SERVER_PORT}%{REQUEST_URI} [L,R]
+RewriteCond %{HTTP_HOST} ^www\.sca-store\.com [NC]
+RewriteRule .* https://sca-store.com%{REQUEST_URI} [L,R]
+
+EOF
+
+cat >>tmp/conf/dvhost.conf <<EOF
+# Redirect www to main home page
+RewriteEngine on
+RewriteCond %{HTTP_HOST} ^www\.sca-store\.com [NC]
+RewriteCond %{SERVER_PORT} !^80$
+RewriteRule .* http://sca-store.com:%{SERVER_PORT}%{REQUEST_URI} [L,R]
+RewriteCond %{HTTP_HOST} ^www\.sca-store\.com [NC]
+RewriteRule .* http://sca-store.com%{REQUEST_URI} [L,R]
+
EOF
# Configure SCA contributions
cat >>tmp/conf/httpd.conf <<EOF
+
# Configure SCA Composite
SCAContribution `pwd`/
SCAComposite edit.composite
@@ -87,6 +103,9 @@ EOF
# Create app links and sub-directories if needed
./mkapplinks
+# Create application database directories
+mkdir -p tmp/appdata/filedb
+
# Start memcached
../../components/cache/memcached-start