summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/openid/openid-conf
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-04 18:53:29 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-07-04 18:53:29 +0000
commitc5a55dc9a5d9a2faf10800f25e74df284207bc09 (patch)
tree793574fe1986856cce95d2ca5b79d3986fc69380 /sca-cpp/trunk/modules/openid/openid-conf
parentd3748ed90ef6ede6952f5da8fbf5c5564134db1d (diff)
HTTPD configuration changes to properly work behind a proxy or in a cluster.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@960383 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/openid/openid-conf')
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-conf11
1 files changed, 11 insertions, 0 deletions
diff --git a/sca-cpp/trunk/modules/openid/openid-conf b/sca-cpp/trunk/modules/openid/openid-conf
index 5085d741cc..2d30502ea6 100755
--- a/sca-cpp/trunk/modules/openid/openid-conf
+++ b/sca-cpp/trunk/modules/openid/openid-conf
@@ -23,6 +23,14 @@ root=`readlink -f $1`
htdocs=`readlink -f $2`
openid_prefix=`cat openid.prefix`
+servername=`cat $root/conf/httpd.conf | grep ServerName | tail -1 | awk '{ print $2 }'`
+ssl=`cat $root/conf/httpd.conf | grep "SSLEngine" | awk '{ print $2 }'`
+if [ "$ssl" = "on" ]; then
+ protocol="https"
+else
+ protocol="http"
+fi
+
# Configure HTTPD mod_auth_openid module
cat >>$root/conf/httpd.conf <<EOF
# Support for OpenID authentication
@@ -33,6 +41,7 @@ AuthOpenIDEnabled On
AuthOpenIDCookiePath /
AuthOpenIDLoginPage /protected/login
AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email
+AuthOpenIDServerName $servername
</Location>
<Location /components>
@@ -40,6 +49,7 @@ AuthOpenIDEnabled On
AuthOpenIDCookiePath /
AuthOpenIDLoginPage /protected/login
AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email
+AuthOpenIDServerName $servername
</Location>
<Location /references>
@@ -47,6 +57,7 @@ AuthOpenIDEnabled On
AuthOpenIDCookiePath /
AuthOpenIDLoginPage /protected/login
AuthOpenIDAXAdd EMAIL http://axschema.org/contact/email
+AuthOpenIDServerName $servername
</Location>
<Location /protected/login>