Help with rewrite rules
Šime Ramov
hi at brand84.com
Thu Feb 15 00:03:54 MSK 2007
On 2/14/07, Igor Sysoev <is at rambler-co.ru> wrote:
> On Tue, Feb 13, 2007 at 10:04:02PM +0100, ?ime Ramov wrote:
>
> > I'm trying to set-up phpMyID (OpenID). Everything works until the last
> > point where I actually need to log in, it just stalls after i enter
> > username and password.
> >
> > I'm running PHP in CGI mode (nginx proxy), so I need to enter some
> > rewrite rules because of that.
> >
> > This is from the htaccess file from the phpMyID distribution:
> >
> > # If you are running PHP in CGI mode you will need to add one set of these
> > # directives to your .htaccess file, or your virtualhost configuration.
> > #
> > # The easiest way to do so is to simply rename this file ".htaccess"
> >
> > # Option 1, mod_rewrite (req)
> > #RewriteEngine on
> > #RewriteCond %{HTTP:Authorization} !^$
> > #RewriteCond %{QUERY_STRING} openid.mode=authorize
> > #RewriteCond %{QUERY_STRING} !auth=
> > #RewriteCond %{REQUEST_METHOD} =GET
> > #RewriteRule (.*) %{REQUEST_URI}?%{QUERY_STRING}&auth=%{HTTP:Authorization}
> > [L]
> >
> >
> > # Option 2, mod_rewrite (env)
> > #RewriteEngine on
> > #RewriteRule \.php$ - [E=PHP_AUTH_DIGEST:%{HTTP:Authorization},L]
> >
> >
> > # Option 3, mod_setenvif
> > #SetEnvIf Authorization "(.*)" PHP_AUTH_DIGEST=$1
> >
> >
> > Now, I need to choose one option (which is possible and best suited
> > for nginx) and convert apache rewrite rules to nginx rewrite rules...
> > Any help would be greatly appreciated...
>
> Do you run PHP as CGI or as FastCGI ?
> If as FastCGI, then try
>
> fastcgi_param PHP_AUTH_DIGEST $http_authorization;
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
More information about the nginx
mailing list