[OpenID-LDAP-Dev] Problem with htaccess
Jonathan Narvaez
jonaabd07 at gmail.com
Tue Feb 3 16:45:46 EET 2009
I do not understand what my mistake
I am following the instructions
--
Jonathan Narvaez
SYSADMIN
On Mon, Feb 2, 2009 at 9:10 AM, Silvan Michael Gebhardt <pcdog at pcdog.ch>wrote:
> you dont need to spec all the rewrites on the HTTPS host
> some of the rewrites that go to HTTPS
> have to be on the 80 Port - Vhost
>
> otherwise you might end up with an endless loop
>
> (forwarding /openid to https://url/openid => matches the rule again =>
> forwarded => matches the rule => )
>
> you get it ;)
>
> my apache logged about some endless stuff and disabled it then ;)
>
>
>
> lg
> silvan
>
> Am 02.02.2009 um 15:06 schrieb Jonathan Narvaez:
>
> Hi my virtual host
>
> <virtualhost my_IP:443>
> ServerAdmin webmaster at localhost
> serverName myurl
> SSLEngine On
> RewriteEngine On
> SSLCertificateFile /etc/apache2/ssl/apache.pem
> RewriteEngine On
> RewriteCond %{REQUEST_URI} !^/(.+)\.php(.*)$
> RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\
> /openid/([A-Za-z0-9]+)\?(.*)\ HTTP/
> RewriteRule ^/openid/(.*)$
> https://myurl/openid/index.php?user=%1&%2 [P]
> RewriteCond %{REQUEST_URI} !^/(.+)\.php(.*)$
> RewriteRule ^/openid/([A-Za-z0-9]+)$
> https://myurl/openid/index.php?user=$1 [P]
> DocumentRoot /var/www/
> <directory />
> Options FollowSymLinks
> AllowOverride All
> </directory>
> <directory /var/www/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> allow from all
> # This directive allows us to have apache2's default start
> page
> # in /apache2-default/, but still have / go to the right
> place
> # Commented out for Ubuntu
> #RedirectMatch ^/$ /apache2-default/
> Options +Indexes
> </directory>
> <Proxy *>
> Order allow,deny
> Allow from all
> </Proxy>
> ProxyVia On
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </directory>
>
> ErrorLog /var/log/apache2/ssl_error.log
>
> .....
>
> Thanks
> --
> Jonathan Narvaez
> SYSADMIN
>
>
> On Mon, Feb 2, 2009 at 8:42 AM, Silvan Michael Gebhardt <pcdog at pcdog.ch>wrote:
>
>> 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>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openid-ldap.org/pipermail/openidldap-dev/attachments/20090203/a6901455/attachment.html
More information about the openidldap-dev
mailing list