[OpenID-LDAP-Dev] Problem with htaccess

Silvan Michael Gebhardt pcdog at pcdog.ch
Mon Feb 2 15:42:05 EET 2009


See my config attached which works

you need to (on debian) enable mod_proxy and mod_rewrite (via a2enmod)


<VirtualHost *>
DocumentRoot "/home/domain/public_html/website"
ServerName domain.ch
ServerAlias www.domain.ch
ErrorLog /var/log/apache2/domain-error.log
CustomLog /var/log/apache2/domain-access.log combined
ReadmeName .FOOTER.html

	RewriteEngine On
    RewriteRule   ^/openid$         https://domain.ch/openid/       
[R=permanent,L]
    RewriteRule   ^/openid/$        https://domain.ch/openid/       
[R=permanent,L]
    RewriteRule   ^/openid/(.*)$    https://domain.ch/openid/$1     
[R=permanent,L]
    SSLProxyEngine On


<Directory "/home/domain/public_html">
allow from all
Options +Indexes
</Directory>

</VirtualHost>



NameVirtualHost 123.456.251.171:443
<VirtualHost 123.456.251.171:443>


    RewriteEngine On
    RewriteCond %{REQUEST_URI}      !^/(.+)\.php(.*)$
    RewriteCond %{THE_REQUEST}      ^[A-Z]{3,9}\ /openid/([A-Za-z0-9]+) 
\?(.*)\ HTTP/
    RewriteRule ^/openid/(.*)$         https://domain.ch/openid/index.php?user= 
%1&%2    [P]
    RewriteCond %{REQUEST_URI}         !^/(.+)\.php(.*)$
    RewriteRule ^/openid/([A-Za-z0-9]+)$  https://domain.ch/openid/index.php?user=$1 
     [P]

DocumentRoot "/home/domain/public_html/website/"


ServerName domain.ch
SSLProxyEngine On
SSLEngine On
SSLCertificateFile /etc/dovecot/imap.domain.ch.crt
SSLCertificateKeyFile /etc/dovecot/imap.domain.ch.key

<Directory "/home/domain/public_html">

allow from all
Options +Indexes
</Directory>
   <Proxy *>
     Order allow,deny
     Allow from all
   </Proxy>
   ProxyVia On

</VirtualHost>



More information about the openidldap-dev mailing list