summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/hosting/server/ssl-start
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsca-cpp/trunk/hosting/server/ssl-start (renamed from sca-cpp/trunk/modules/edit/ssl-start)61
1 files changed, 35 insertions, 26 deletions
diff --git a/sca-cpp/trunk/modules/edit/ssl-start b/sca-cpp/trunk/hosting/server/ssl-start
index fdc5a8b8dc..9be614fa8e 100755
--- a/sca-cpp/trunk/modules/edit/ssl-start
+++ b/sca-cpp/trunk/hosting/server/ssl-start
@@ -17,15 +17,15 @@
# specific language governing permissions and limitations
# under the License.
-# For this module to work, add the sca-store.com domain to your /etc/hosts as follows:
-# 127.0.0.1 sca-store.com
+# For this module to work, add the example.com domain to your /etc/hosts as follows:
+# 127.0.0.1 example.com
here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
-jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python`
+jsprefix=`echo "import os; print os.path.realpath('$here/../../modules/js')" | python`
# Create SSL certificates
-../../modules/http/ssl-ca-conf tmp sca-store.com
-../../modules/http/ssl-cert-conf tmp sca-store.com server
+../../modules/http/ssl-ca-conf tmp example.com
+../../modules/http/ssl-cert-conf tmp example.com server
# Configure and start logging
if [ -x ../../components/log/scribe-cat ]; then
@@ -40,7 +40,7 @@ fi
../../components/cache/memcached-start tmp 11212
# Configure server
-../../modules/http/httpd-conf tmp sca-store.com 8090 htdocs
+../../modules/http/httpd-conf tmp example.com 8090 htdocs
../../modules/http/httpd-event-conf tmp
../../modules/http/httpd-ssl-conf tmp 8453
@@ -66,8 +66,8 @@ fi
#../../modules/http/group-auth-conf tmp jane
#../../modules/http/group-auth-conf tmp admin
# Configure the email addresses associated with your OpenID and OAuth ids here
-../../modules/http/group-auth-conf tmp john@sca-store.com
-../../modules/http/group-auth-conf tmp jane@sca-store.com
+../../modules/http/group-auth-conf tmp john@example.com
+../../modules/http/group-auth-conf tmp jane@example.com
# Configure mod-security
../../modules/http/mod-security-conf tmp
@@ -80,6 +80,7 @@ fi
if [ -x ../../components/log/scribe-cat ]; then
cat >tmp/conf/log.conf <<EOF
# Generated by: ssl-start $*
+LogLevel notice
ErrorLog "|$here/../../components/log/scribe-cat server"
CustomLog "|$here/../../components/log/scribe-cat server" combined
@@ -97,6 +98,27 @@ SecAuditLog "|$here/../../components/log/scribe-cat secaudit"
EOF
+else
+ cat >tmp/conf/log.conf <<EOF
+# Generated by: ssl=start $*
+LogLevel debug
+ErrorLog $here/tmp/logs/error_log
+CustomLog $here/tmp/logs/access_log combined
+
+EOF
+
+ cat >tmp/conf/log-ssl.conf <<EOF
+# Generated by: ssl-start $*
+CustomLog $here/tmp/logs/ssl_access_log sslcombined
+
+EOF
+
+ cat >tmp/conf/mod-security-log.conf <<EOF
+# Generated by: ssl-start $*
+SecAuditLog $here/tmp/logs/secaudit_log secaudit
+
+EOF
+
fi
# Configure certificate mime type
@@ -124,11 +146,11 @@ EOF
cat >>tmp/conf/httpd.conf <<EOF
# Generated by: ssl-start $*
# Configure SCA Composite
-SCAContribution `pwd`/
-SCAComposite edit.composite
+SCAContribution $here/
+SCAComposite server.composite
# Configure SCA Composite for mass dynamic virtual Hosting
-SCAVirtualContribution `pwd`/apps/
+SCAVirtualContribution $here/apps/
SCAVirtualComposite app.composite
EOF
@@ -142,29 +164,16 @@ Alias /home/home.b64 $here/htdocs/home/home.b64
EOF
# Create app resource links
-./mkapplinks . ../../../.. ../../../../../nuvem
+./mkapplinks data ../../../../.. ../../../../../../nuvem
# Configure app resource aliases
cat >>tmp/conf/svhost-ssl.conf <<EOF
# Generated by: ssl-start $*
-<Location /v>
-RewriteEngine on
-
# Map /v/<app-name>/<path> to htdocs/app/<path>
-RewriteCond %{REQUEST_URI} ^/v/.+/.*$
-RewriteRule /v/(.+)/(.*)$ $here/htdocs/app/\$2 [L]
-
-# Redirect /v/<app-name> to /<app-name>/
-RewriteCond %{REQUEST_URI} ^/v/[^/]+$
-RewriteRule /v/([^/]+)$ /\$1/ [L,R]
-
-</Location>
+AliasMatch /v/([^/]+)(.*)$ $here/htdocs/app\$2
EOF
-# Create application database directories
-mkdir -p tmp/appdata/filedb
-
# Start server
../../modules/http/httpd-start tmp