Deny requests of any file without authentication

caio nginx-forum at
Tue Aug 17 02:27:34 MSD 2010

Hi guys.

Try to access this image:

Gmail doesn't allow your request and redirect you to login, after that
you will be able to see the image.

I use php + nginx + fastcgi + mongodb and can't do this trick with
sessions (not with images) or http authentication (user's password must
be in database), what should I do ? :(


I've asked this question before without success. So I come here begging
for help because I'm going crazy spending nights without a god damn
answer =( I really don't know what to do, I tried some things but it's a
big mess:

Configuration of Nginx:

Posted at Nginx Forum:,120496,120496#msg-120496

More information about the nginx mailing list