diff options
Diffstat (limited to 'sca-cpp/trunk/modules/server/server-conf')
-rwxr-xr-x | sca-cpp/trunk/modules/server/server-conf | 51 |
1 files changed, 51 insertions, 0 deletions
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 + |