summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/server
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/server')
-rwxr-xr-xsca-cpp/trunk/modules/server/cpp-conf1
-rw-r--r--sca-cpp/trunk/modules/server/mod-eval.hpp6
-rwxr-xr-xsca-cpp/trunk/modules/server/scheme-conf1
-rwxr-xr-xsca-cpp/trunk/modules/server/server-conf51
4 files changed, 56 insertions, 3 deletions
diff --git a/sca-cpp/trunk/modules/server/cpp-conf b/sca-cpp/trunk/modules/server/cpp-conf
index bc014ac979..0421e6bf12 100755
--- a/sca-cpp/trunk/modules/server/cpp-conf
+++ b/sca-cpp/trunk/modules/server/cpp-conf
@@ -22,6 +22,7 @@ here=`readlink -f $0`; here=`dirname $here`
root=`readlink -f $1`
cat >>$root/conf/httpd.conf <<EOF
+# Generated by: cpp-conf $*
# Support for C++ SCA components
LoadModule mod_tuscany_eval $here/libmod_tuscany_eval.so
diff --git a/sca-cpp/trunk/modules/server/mod-eval.hpp b/sca-cpp/trunk/modules/server/mod-eval.hpp
index 829edef387..857fd0a1e1 100644
--- a/sca-cpp/trunk/modules/server/mod-eval.hpp
+++ b/sca-cpp/trunk/modules/server/mod-eval.hpp
@@ -769,9 +769,9 @@ const command_rec commands[] = {
AP_INIT_TAKE1("SCAVirtualContribution", (const char*(*)())confVirtualContribution, NULL, RSRC_CONF, "SCA virtual host contribution location"),
AP_INIT_TAKE1("SCAVirtualComposite", (const char*(*)())confVirtualComposite, NULL, RSRC_CONF, "SCA virtual composite location"),
AP_INIT_TAKE12("SCASetEnv", (const char*(*)())confEnv, NULL, OR_FILEINFO, "Environment variable name and optional value"),
- AP_INIT_TAKE1("SSLCACertificateFile", (const char*(*)())confCAFile, NULL, RSRC_CONF, "SSL CA certificate file"),
- AP_INIT_TAKE1("SSLCertificateFile", (const char*(*)())confCertFile, NULL, RSRC_CONF, "SSL certificate file"),
- AP_INIT_TAKE1("SSLCertificateKeyFile", (const char*(*)())confCertKeyFile, NULL, RSRC_CONF, "SSL certificate key file"),
+ AP_INIT_TAKE1("SCAWiringSSLCACertificateFile", (const char*(*)())confCAFile, NULL, RSRC_CONF, "SCA wiring SSL CA certificate file"),
+ AP_INIT_TAKE1("SCAWiringSSLCertificateFile", (const char*(*)())confCertFile, NULL, RSRC_CONF, "SCA wiring SSL certificate file"),
+ AP_INIT_TAKE1("SCAWiringSSLCertificateKeyFile", (const char*(*)())confCertKeyFile, NULL, RSRC_CONF, "SCA wiring SSL certificate key file"),
{NULL, NULL, NULL, 0, NO_ARGS, NULL}
};
diff --git a/sca-cpp/trunk/modules/server/scheme-conf b/sca-cpp/trunk/modules/server/scheme-conf
index fc5f2b3ac8..8c3b26625b 100755
--- a/sca-cpp/trunk/modules/server/scheme-conf
+++ b/sca-cpp/trunk/modules/server/scheme-conf
@@ -22,6 +22,7 @@ here=`readlink -f $0`; here=`dirname $here`
root=`readlink -f $1`
cat >>$root/conf/httpd.conf <<EOF
+# Generated by: scheme-conf $*
# Support for Scheme SCA components
LoadModule mod_tuscany_eval $here/libmod_tuscany_eval.so
diff --git a/sca-cpp/trunk/modules/server/server-conf b/sca-cpp/trunk/modules/server/server-conf
index 359a8ebc16..4a318c6fce 100755
--- a/sca-cpp/trunk/modules/server/server-conf
+++ b/sca-cpp/trunk/modules/server/server-conf
@@ -21,12 +21,63 @@
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 }'`
+port=`echo $conf | awk '{ print $7 }' | awk -F "/" '{ print $1 }'`
+pport=`echo $conf | awk '{ print $7 }' | awk -F "/" '{ print $2 }'`
+if [ "$pport" = "" ]; then
+ pport=$port
+fi
+servername="http://$host:$pport"
+
+sslconf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"`
+if [ "$sslconf" != "" ]; then
+ 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
+ servername="https://$host:$sslpport"
+fi
+
cat >>$root/conf/httpd.conf <<EOF
+# Generated by: server-conf $*
# Support for SCA component wiring
LoadModule mod_tuscany_wiring $here/libmod_tuscany_wiring.so
+# Route all wiring through the configured server name
+SCAWiringServerName $servername
+
# Serve HTTP binding JavaScript client code
Alias /js/tuscany-ref.js $here/htdocs/js/tuscany-ref.js
EOF
+ssl=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-ssl-conf"`
+if [ "$ssl" != "" ]; then
+ cat >>$root/conf/httpd.conf <<EOF
+# Configure SSL certificates
+SCAWiringSSLCACertificateFile "$root/conf/ca.crt"
+SCAWiringSSLCertificateFile "$root/conf/server.crt"
+SCAWiringSSLCertificateKeyFile "$root/conf/server.key"
+
+EOF
+
+fi
+
+vhost=`cat $root/conf/httpd.conf | grep VirtualDocumentRoot`
+proxy=`cat $root/conf/httpd.conf | grep ProxyPass`
+
+vhost=`cat $root/conf/httpd.conf | grep "# Generated by: vhost-conf"`
+if [ "$vhost" != "" ]; then
+ proxy=`cat $root/conf/httpd.conf | grep "# Generated by: proxy-conf"`
+ if [ "$proxy" = "" ]; then
+ cat >>$root/conf/httpd.conf <<EOF
+# Isolate requests from different virtual hosts
+MaxRequestsPerChild 1
+
+EOF
+
+ fi
+fi
+