diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-08 06:38:07 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-08 06:38:07 +0000 |
commit | 211c686bc6d05d8d05e5490b9a9f612619461abc (patch) | |
tree | bb8f56afb24f2b52ea92598babff7d94fd70da10 /sca-cpp/trunk/modules | |
parent | f6a51224cc350c7d3b42b15051a9c074cce48b5d (diff) |
More changes to get both single and mass dynamic virtual hosting working with HTTP and HTTPS.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@961589 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules')
-rw-r--r-- | sca-cpp/trunk/modules/http/Makefile.am | 2 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-conf | 35 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/httpd-ssl-conf | 50 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/http/httpd.hpp | 29 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/ssl-ca-conf (renamed from sca-cpp/trunk/modules/http/httpd-ca-conf) | 0 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/http/ssl-cert-conf (renamed from sca-cpp/trunk/modules/http/httpd-cert-conf) | 15 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/server/mod-eval.hpp | 59 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/server/mod-wiring.cpp | 34 | ||||
-rwxr-xr-x | sca-cpp/trunk/modules/server/server-conf | 16 |
9 files changed, 164 insertions, 76 deletions
diff --git a/sca-cpp/trunk/modules/http/Makefile.am b/sca-cpp/trunk/modules/http/Makefile.am index 795137b6ca..f25ef170c9 100644 --- a/sca-cpp/trunk/modules/http/Makefile.am +++ b/sca-cpp/trunk/modules/http/Makefile.am @@ -20,7 +20,7 @@ INCLUDES = -I${HTTPD_INCLUDE} incl_HEADERS = *.hpp incldir = $(prefix)/include/modules/http -dist_mod_SCRIPTS = httpd-conf httpd-start httpd-stop httpd-restart httpd-ca-conf httpd-cert-conf httpd-ssl-conf +dist_mod_SCRIPTS = httpd-conf httpd-start httpd-stop httpd-restart ssl-ca-conf ssl-cert-conf httpd-ssl-conf moddir=$(prefix)/modules/http curl_test_SOURCES = curl-test.cpp diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf index a6ba048f67..70c0b295af 100755 --- a/sca-cpp/trunk/modules/http/httpd-conf +++ b/sca-cpp/trunk/modules/http/httpd-conf @@ -30,13 +30,7 @@ htdocs=`readlink -f $4` user=`id -un` group=`id -gn` modules_prefix=`cat $here/httpd-modules.prefix` -if [ "$5" = "vhost" ]; then - vhost="VirtualDocumentRoot $htdocs/domains/%1/" - maxr="MaxRequestsPerChild 1" -else - vhost="#VirtualDocumentRoot $htdocs/domains/%1/" - maxr="#MaxRequestsPerChild 1" -fi +vhost=$5 mkdir -p $root mkdir -p $root/logs @@ -123,19 +117,34 @@ Options FollowSymLinks Allow from all </Location> -# Setup HTTP virtual host +# Setup HTTP virtual hosts Listen $port -<VirtualHost _default_:$port> + +<VirtualHost *:$port> ServerName http://$host:$pport UseCanonicalName Off -UseCanonicalPhysicalPort Off +</VirtualHost> + +EOF +# Generate mass dynamic virtual hosting configuration +if [ "$vhost" = "vhost" ]; then + +cat >>$root/conf/httpd.conf <<EOF # Setup mass dynamic virtual hosting -$vhost +NameVirtualHost *:$port + +<VirtualHost *:$port> +ServerName http://vhost.$host:$pport +ServerAlias *.$host +UseCanonicalName Off +VirtualDocumentRoot $htdocs/domains/%1/ </VirtualHost> -# Isolate dynamic virtual hosts -$maxr +# Isolate virtual host based requests +MaxRequestsPerChild 1 EOF +fi + diff --git a/sca-cpp/trunk/modules/http/httpd-ssl-conf b/sca-cpp/trunk/modules/http/httpd-ssl-conf index 04ca61dba0..f6082dea14 100755 --- a/sca-cpp/trunk/modules/http/httpd-ssl-conf +++ b/sca-cpp/trunk/modules/http/httpd-ssl-conf @@ -28,6 +28,7 @@ if [ "$sslpport" = "" ]; then fi htdocs=`readlink -f $4` httpd_prefix=`cat $here/httpd.prefix` +vhost=$5 # Extract organization name from our CA certificate org=`openssl x509 -noout -subject -nameopt multiline -in $root/conf/ca.crt | grep organizationName | awk -F "= " '{ print $2 }'` @@ -51,19 +52,31 @@ SSLMutex "file:$root/logs/ssl_mutex" SSLRandomSeed startup builtin SSLRandomSeed connect builtin -# HTTPS virtual host +# Setup HTTPS virtual hosts Listen $sslport -<VirtualHost _default_:$sslport> + +SSLCACertificateFile "$root/conf/ca.crt" +SSLCertificateFile "$root/conf/server.crt" +SSLCertificateKeyFile "$root/conf/server.key" + +<VirtualHost *:$sslport> ServerName https://$host:$sslpport UseCanonicalName Off -UseCanonicalPhysicalPort Off # Enable SSL +Include conf/ssl-vhost.conf +</VirtualHost> + +# Route all wiring through HTTPS +SCAWiringServerName https://$host:$sslpport + +EOF + +# Generate VirtualHost SSL configuration +cat >$root/conf/ssl-vhost.conf <<EOF +# Enable SSL SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL -SSLCACertificateFile "$root/conf/ca.crt" -SSLCertificateFile "$root/conf/server.crt" -SSLCertificateKeyFile "$root/conf/server.key" BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 # Logging @@ -88,12 +101,35 @@ AuthType Basic AuthName "$host" AuthUserFile "$root/conf/httpd.passwd" Require valid-user -</location> +</Location> + +EOF + +# Generate mass dynamic virtual hosting configuration +if [ "$vhost" = "vhost" ]; then + +cat >>$root/conf/httpd.conf <<EOF +# Setup mass dynamic virtual hosting +NameVirtualHost *:$sslport +SSLStrictSNIVHostCheck Off +<VirtualHost *:$sslport> +ServerName https://vhost.$host:$sslpport +ServerAlias *.$host +UseCanonicalName Off +VirtualDocumentRoot $htdocs/domains/%1/ + +# Enable SSL +SSLCACertificateFile "$root/conf/ca.crt" +SSLCertificateFile "$root/conf/vhost.crt" +SSLCertificateKeyFile "$root/conf/vhost.key" +Include conf/ssl-vhost.conf </VirtualHost> EOF +fi + # Create test users for HTTP basic authentication $httpd_prefix/bin/htpasswd -bc $root/conf/httpd.passwd test test 2>/dev/null $httpd_prefix/bin/htpasswd -b $root/conf/httpd.passwd foo foo 2>/dev/null diff --git a/sca-cpp/trunk/modules/http/httpd.hpp b/sca-cpp/trunk/modules/http/httpd.hpp index bd4f6e8ada..05403a5897 100644 --- a/sca-cpp/trunk/modules/http/httpd.hpp +++ b/sca-cpp/trunk/modules/http/httpd.hpp @@ -100,6 +100,35 @@ const string serverName(request_rec* r) { } /** + * Return the host name for a server. + */ +const string hostName(const server_rec* s) { + return s->server_hostname != NULL? s->server_hostname : "localhost"; +} + +/** + * Return the host name from an HTTP request. + */ +const string hostName(request_rec* r) { + const char* hn = ap_get_server_name(r); + return hn != NULL? hn : (r->server->server_hostname != NULL? r->server->server_hostname : "localhost"); +} + +/** + * Return the first subdomain name in a host name. + */ +const string subdomain(const string& host) { + return substr(host, 0, find(host, '.')); +} + +/** + * Return true if a request is targeting a virtual host. + */ +const bool isVirtualHostRequest(const server_rec* s, request_rec* r) { + return serverName(r) != serverName(s); +} + +/** * Return the content type of a request. */ const char* optional(const char* s) { diff --git a/sca-cpp/trunk/modules/http/httpd-ca-conf b/sca-cpp/trunk/modules/http/ssl-ca-conf index c5a3f8e894..c5a3f8e894 100755 --- a/sca-cpp/trunk/modules/http/httpd-ca-conf +++ b/sca-cpp/trunk/modules/http/ssl-ca-conf diff --git a/sca-cpp/trunk/modules/http/httpd-cert-conf b/sca-cpp/trunk/modules/http/ssl-cert-conf index b6dc8ebd6f..a7a1103d1a 100755 --- a/sca-cpp/trunk/modules/http/httpd-cert-conf +++ b/sca-cpp/trunk/modules/http/ssl-cert-conf @@ -21,16 +21,21 @@ here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` host=$2 +if [ "$3" != "" ]; then + certname=$3 +else + certname="server" +fi # Don't regenerate the certificate if it already exists -if [ -f $root/conf/server.crt ]; then +if [ -f $root/conf/$certname.crt ]; then return 0 fi # Generate openssl configuration mkdir -p $root/conf umask 0007 -cat >$root/conf/openssl-cert.conf <<EOF +cat >$root/conf/openssl-cert-$certname.conf <<EOF [ req ] default_bits = 1024 encrypt_key = no @@ -48,11 +53,11 @@ emailAddress = root@$host EOF # Generate a certificate request -openssl req -new -config $root/conf/openssl-cert.conf -out $root/conf/server-req.crt -keyout $root/conf/server.key +openssl req -new -config $root/conf/openssl-cert-$certname.conf -out $root/conf/$certname-req.crt -keyout $root/conf/$certname.key # Generate a certificate, signed with our test certification authority certificate -openssl ca -batch -config $root/conf/openssl-ca.conf -out $root/conf/server.crt -infiles $root/conf/server-req.crt +openssl ca -batch -config $root/conf/openssl-ca.conf -out $root/conf/$certname.crt -infiles $root/conf/$certname-req.crt # Export it to PKCS12 format, that's the format Web browsers want to import -openssl pkcs12 -export -passout pass: -out $root/conf/server.p12 -inkey $root/conf/server.key -in $root/conf/server.crt -certfile $root/conf/ca.crt +openssl pkcs12 -export -passout pass: -out $root/conf/$certname.p12 -inkey $root/conf/$certname.key -in $root/conf/$certname.crt -certfile $root/conf/ca.crt diff --git a/sca-cpp/trunk/modules/server/mod-eval.hpp b/sca-cpp/trunk/modules/server/mod-eval.hpp index 464e0eabf1..ded496a0bf 100644 --- a/sca-cpp/trunk/modules/server/mod-eval.hpp +++ b/sca-cpp/trunk/modules/server/mod-eval.hpp @@ -78,6 +78,13 @@ const bool hasCompositeConf(const ServerConf& sc) { } /** + * Return true if a server contains a virtual host composite configuration. + */ +const bool hasVirtualCompositeConf(const ServerConf& sc) { + return sc.virtualHostContributionPath != "" && sc.virtualHostCompositeName != ""; +} + +/** * Convert a result represented as a content + failure pair to a * failable monad. */ @@ -421,6 +428,11 @@ const failable<list<value> > applyLifecycleExpr(const list<value>& impls, const const failable<bool> confComponents(ServerConf& sc) { if (!hasCompositeConf(sc)) return false; + debug(sc.contributionPath, "modeval::confComponents::contributionPath"); + debug(sc.compositeName, "modeval::confComponents::compositeName"); + if (sc.ca != "") debug(sc.ca, "modeval::confComponents::sslCA"); + if (sc.cert != "") debug(sc.cert, "modeval::confComponents::sslCert"); + if (sc.key != "") debug(sc.key, "modeval::confComponents::sslKey"); // Chdir to the deployed contribution if (chdir(c_str(sc.contributionPath)) != 0) @@ -462,9 +474,8 @@ const failable<bool> startComponents(ServerConf& sc) { class VirtualHostConf { public: VirtualHostConf(const ServerConf& ssc) : sc(ssc.server) { - sc.contributionPath = ssc.virtualHostContributionPath; - sc.compositeName = ssc.virtualHostCompositeName; - sc.wiringServerName = ssc.wiringServerName; + sc.virtualHostContributionPath = ssc.virtualHostContributionPath; + sc.virtualHostCompositeName = ssc.virtualHostCompositeName; sc.ca = ssc.ca; sc.cert = ssc.cert; sc.key = ssc.key; @@ -489,10 +500,14 @@ const failable<bool> virtualHostConfig(ServerConf& sc, request_rec* r) { debug(httpd::serverName(r), "modeval::virtualHostConfig::virtualHostName"); sc.wiringServerName = httpd::serverName(r); debug(sc.wiringServerName, "modeval::virtualHostConfig::wiringServerName"); + debug(sc.virtualHostContributionPath, "modwiring::virtualHostConfig::virtualHostContributionPath"); + + // Resolve the configured virtual contribution under + // the virtual host's SCA contribution root + sc.contributionPath = sc.virtualHostContributionPath + httpd::subdomain(httpd::hostName(r)) + "/"; + sc.compositeName = sc.virtualHostCompositeName; // Configure the deployed components - debug(sc.contributionPath, "modeval::virtualHostConfig::contributionPath"); - debug(sc.compositeName, "modeval::virtualHostConfig::compositeName"); const failable<bool> cr = confComponents(sc); if (!hasContent(cr)) return cr; @@ -529,8 +544,8 @@ int handler(request_rec *r) { // Process dynamic virtual host configuration, if any VirtualHostConf vhc(sc); - const bool hasv = hasCompositeConf(vhc.sc); - if (hasv) { + const bool usevh = hasVirtualCompositeConf(vhc.sc) && httpd::isVirtualHostRequest(sc.server, r); + if (usevh) { const failable<bool> cr = virtualHostConfig(vhc.sc, r); if (!hasContent(cr)) return httpd::reportStatus(mkfailure<int>(reason(cr))); @@ -538,7 +553,7 @@ int handler(request_rec *r) { // Get the component implementation lambda const list<value> path(pathValues(r->uri)); - const list<value> impl(assoctree<value>(cadr(path), hasv? vhc.sc.implTree : sc.implTree)); + const list<value> impl(assoctree<value>(cadr(path), usevh? vhc.sc.implTree : sc.implTree)); if (isNil(impl)) return httpd::reportStatus(mkfailure<int>(string("Couldn't find component implementation"))); @@ -584,17 +599,17 @@ apr_status_t serverCleanup(void* v) { const int postConfigMerge(const ServerConf& mainsc, server_rec* s) { if (s == NULL) return OK; - ostringstream sname; - debug(httpd::serverName(s), "modeval::postConfigMerge::serverName"); ServerConf& sc = httpd::serverConf<ServerConf>(s, &mod_tuscany_eval); - sc.wiringServerName = mainsc.wiringServerName; + debug(httpd::serverName(s), "modeval::postConfigMerge::serverName"); + if (sc.wiringServerName == "") sc.wiringServerName = httpd::serverName(s); + debug(httpd::serverName(s), "modeval::postConfigMerge::wiringServerName"); sc.contributionPath = mainsc.contributionPath; sc.compositeName = mainsc.compositeName; sc.virtualHostContributionPath = mainsc.virtualHostContributionPath; sc.virtualHostCompositeName = mainsc.virtualHostCompositeName; - sc.ca = mainsc.ca; - sc.cert = mainsc.cert; - sc.key = mainsc.key; + if (sc.ca == "") sc.ca = mainsc.ca; + if (sc.cert == "") sc.cert = mainsc.cert; + if (sc.key == "") sc.key = mainsc.key; sc.implementations = mainsc.implementations; sc.implTree = mainsc.implTree; return postConfigMerge(mainsc, s->next); @@ -608,8 +623,7 @@ int postConfig(apr_pool_t *p, unused apr_pool_t *plog, unused apr_pool_t *ptemp, // Get the server configuration and determine the wiring server name ServerConf& sc = httpd::serverConf<ServerConf>(s, &mod_tuscany_eval); debug(httpd::serverName(s), "modeval::postConfig::serverName"); - if (sc.wiringServerName == "") - sc.wiringServerName = httpd::serverName(s); + if (sc.wiringServerName == "") sc.wiringServerName = httpd::serverName(s); debug(sc.wiringServerName, "modeval::postConfig::wiringServerName"); // Count the calls to post config @@ -638,8 +652,6 @@ int postConfig(apr_pool_t *p, unused apr_pool_t *plog, unused apr_pool_t *ptemp, } // Configure the deployed components - debug(sc.contributionPath, "modeval::postConfig::contributionPath"); - debug(sc.compositeName, "modeval::postConfig::compositeName"); const failable<bool> res = confComponents(sc); if (!hasContent(res)) { cerr << "[Tuscany] Due to one or more errors mod_tuscany_eval loading failed. Causing apache to stop loading." << endl; @@ -649,7 +661,7 @@ int postConfig(apr_pool_t *p, unused apr_pool_t *plog, unused apr_pool_t *ptemp, // Register a cleanup callback, called when the server is stopped or restarted apr_pool_pre_cleanup_register(p, (void*)&sc, serverCleanup); - // Merge the config into any virtual hosts + // Merge the configuration into the virtual hosts return postConfigMerge(sc, s->next); } @@ -670,6 +682,9 @@ void childInit(apr_pool_t* p, server_rec* s) { cerr << "[Tuscany] Due to one or more errors mod_tuscany_eval loading failed. Causing apache to stop loading." << endl; exit(APEXIT_CHILDFATAL); } + + // Merge the updated configuration into the virtual hosts + postConfigMerge(*sc, s->next); // Register a cleanup callback, called when the child is stopped or restarted apr_pool_pre_cleanup_register(p, (void*)sc, serverCleanup); @@ -743,9 +758,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("SCASSLCACertificateFile", (const char*(*)())confCAFile, NULL, RSRC_CONF, "SSL CA certificate file"), - AP_INIT_TAKE1("SCASSLCertificateFile", (const char*(*)())confCertFile, NULL, RSRC_CONF, "SSL certificate file"), - AP_INIT_TAKE1("SCASSLCertificateKeyFile", (const char*(*)())confCertKeyFile, NULL, RSRC_CONF, "SSL certificate key file"), + 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"), {NULL, NULL, NULL, 0, NO_ARGS, NULL} }; diff --git a/sca-cpp/trunk/modules/server/mod-wiring.cpp b/sca-cpp/trunk/modules/server/mod-wiring.cpp index 5b2aba73b3..964f7efc82 100644 --- a/sca-cpp/trunk/modules/server/mod-wiring.cpp +++ b/sca-cpp/trunk/modules/server/mod-wiring.cpp @@ -72,6 +72,13 @@ const bool hasCompositeConf(const ServerConf& sc) { } /** + * Return true if a server contains a virtual host composite configuration. + */ +const bool hasVirtualCompositeConf(const ServerConf& sc) { + return sc.virtualHostContributionPath != "" && sc.virtualHostCompositeName != ""; +} + +/** * Returns true if a URI is absolute. */ const bool isAbsolute(const string& uri) { @@ -235,6 +242,8 @@ const list<value> uriToComponentAssoc(const list<value>& c) { const bool confComponents(ServerConf& sc) { if (!hasCompositeConf(sc)) return true; + debug(sc.contributionPath, "modwiring::confComponents::contributionPath"); + debug(sc.compositeName, "modwiring::confComponents::compositeName"); // Read the component configuration and store the references and service URIs // in trees for fast retrieval later @@ -257,8 +266,8 @@ const bool confComponents(ServerConf& sc) { class VirtualHostConf { public: VirtualHostConf(const ServerConf& ssc) : sc(ssc.server) { - sc.contributionPath = ssc.virtualHostContributionPath; - sc.compositeName = ssc.virtualHostCompositeName; + sc.virtualHostContributionPath = ssc.virtualHostContributionPath; + sc.virtualHostCompositeName = ssc.virtualHostCompositeName; } ~VirtualHostConf() { @@ -273,10 +282,14 @@ public: const failable<bool> virtualHostConfig(ServerConf& sc, request_rec* r) { debug(httpd::serverName(sc.server), "modwiring::virtualHostConfig::serverName"); debug(httpd::serverName(r), "modwiring::virtualHostConfig::virtualHostName"); + debug(sc.virtualHostContributionPath, "modwiring::virtualHostConfig::virtualHostContributionPath"); + + // Resolve the configured virtual contribution under + // the virtual host's SCA contribution root + sc.contributionPath = sc.virtualHostContributionPath + httpd::subdomain(httpd::hostName(r)) + "/"; + sc.compositeName = sc.virtualHostCompositeName; // Configure the wiring for the deployed components - debug(sc.contributionPath, "modwiring::virtualHostConfig::contributionPath"); - debug(sc.compositeName, "modwiring::virtualHostConfig::compositeName"); confComponents(sc); return true; } @@ -297,8 +310,8 @@ int translate(request_rec *r) { // Process dynamic virtual host configuration, if any VirtualHostConf vhc(sc); - const bool hasv = hasCompositeConf(vhc.sc); - if (hasv) { + const bool usevh = hasVirtualCompositeConf(vhc.sc) && httpd::isVirtualHostRequest(sc.server, r); + if (usevh) { const failable<bool> cr = virtualHostConfig(vhc.sc, r); if (!hasContent(cr)) return -1; @@ -306,10 +319,10 @@ int translate(request_rec *r) { // Translate a component reference request if (!strncmp(r->uri, "/references/", 12)) - return translateReference(hasv? vhc.sc: sc, r); + return translateReference(usevh? vhc.sc: sc, r); // Translate a service request - return translateService(hasv? vhc.sc : sc, r); + return translateService(usevh? vhc.sc : sc, r); } /** @@ -340,7 +353,6 @@ int handler(request_rec *r) { const int postConfigMerge(const ServerConf& mainsc, server_rec* s) { if (s == NULL) return OK; - ostringstream sname; debug(httpd::serverName(s), "modwiring::postConfigMerge::serverName"); ServerConf& sc = httpd::serverConf<ServerConf>(s, &mod_tuscany_wiring); sc.contributionPath = mainsc.contributionPath; @@ -364,10 +376,8 @@ int postConfig(unused apr_pool_t *p, unused apr_pool_t *plog, unused apr_pool_t return OK; // Configure the wiring for the deployed components - ServerConf& sc = httpd::serverConf<ServerConf>(s, &mod_tuscany_wiring); debug(httpd::serverName(s), "modwiring::postConfig::serverName"); - debug(sc.contributionPath, "modwiring::postConfig::contributionPath"); - debug(sc.compositeName, "modwiring::postConfig::compositeName"); + ServerConf& sc = httpd::serverConf<ServerConf>(s, &mod_tuscany_wiring); confComponents(sc); // Merge the config into any virtual hosts diff --git a/sca-cpp/trunk/modules/server/server-conf b/sca-cpp/trunk/modules/server/server-conf index cff1ab1965..359a8ebc16 100755 --- a/sca-cpp/trunk/modules/server/server-conf +++ b/sca-cpp/trunk/modules/server/server-conf @@ -21,25 +21,9 @@ here=`readlink -f $0`; here=`dirname $here` root=`readlink -f $1` -servername=`cat $root/conf/httpd.conf | grep ServerName | tail -1 | awk '{ print $2 }'` -host=`echo $servername | awk -F ":" '{ printf "%s:%s", $1, $2 }'` -port=`cat $root/conf/httpd.conf | grep Listen | tail -1 | awk '{ print $2 }'` - -ssl=`cat $root/conf/httpd.conf | grep "SSLEngine" | awk '{ print $2 }'` -if [ "$ssl" = "on" ]; then -cat >>$root/conf/httpd.conf <<EOF -# Configure SCA SSL support -SCASSLCACertificateFile "$root/conf/ca.crt" -SCASSLCertificateFile "$root/conf/server.crt" -SCASSLCertificateKeyFile "$root/conf/server.key" - -EOF -fi - cat >>$root/conf/httpd.conf <<EOF # Support for SCA component wiring LoadModule mod_tuscany_wiring $here/libmod_tuscany_wiring.so -#SCAWiringServerName $host:$port # Serve HTTP binding JavaScript client code Alias /js/tuscany-ref.js $here/htdocs/js/tuscany-ref.js |