Disabling basic_auth with rewrites

klausi nginx-forum at nginx.us
Thu May 19 20:43:03 MSD 2011


Maxim Dounin Wrote:
-------------------------------------------------------
> 
>     location / {
>         auth_basic "protected";
>         auth_basic_user_file
> /etc/nginx/htpasswd/protected;
>         ...
> 
>         location ~ \.php$ {
>             fastcgi_pass ...
>             ...
>         }
>     }
> 
>     location /feeds/importer/ {
>         ...
> 
>         location ~ \.php$ {
>             fastcgi_pass ...
>             ...
>         }
>     }

Thanks for the quick reply, nested locations are nice, but they do not
help in this special case. A request to /feeds/importer/* has to be
rewritten to /index.php?q=feeds/importer/* and that should not be
protected. Is unprotecting a path with a special query possible at all?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,199278,199319#msg-199319




More information about the nginx mailing list