diff options
-rwxr-xr-x | bin/ldap2apache | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/ldap2apache b/bin/ldap2apache index 312eb81..ef0b081 100755 --- a/bin/ldap2apache +++ b/bin/ldap2apache @@ -122,6 +122,12 @@ clients.each{ |c| config << " ServerAlias #{server_aliases}" if server_aliases != "" config << " ServerAdmin #{server_admin}" config << "" + if property['canonical'] == "yes" + config << " RewriteEngine on" + config << " RewriteCond %{HTTP_HOST} !^#{server_name}$" + config << " RewriteRule ^/(.*) %s://#{server_name}/$1 [R]"%[ ( ssl ? 'https' : 'http' ) ] + end + config << "" config << " UserDir disabled" unless property['userdir'] == "yes" config << " SuexecUserGroup #{c['uid']} #{c['uid']}" unless property['setusergroup'] == "no" #config << " User #{c['uid']}" unless property['setusergroup'] == "no" |