.htaccess issues

Guilherme guilherme.e at gmail.com
Fri Feb 10 17:57:31 UTC 2012


Antonio,

I'm using apache as a back-end, and I need to keep .htaccess files in
apache, because this is a shared web hosting server and it's hosting ~
thousand websites.

The problem is that nginx is serving content allowed just for some IPs, for
everyone, after this content is cached.

On Fri, Feb 10, 2012 at 3:32 PM, António P. P. Almeida <appa at perusio.net>wrote:

> On 10 Fev 2012 17h08 WET, guilherme.e at gmail.com wrote:
>
> > I'm starting to use nginx as a proxy/cache (apache back-end), and
> > I've a problem regarding directories that uses .htaccess to restrict
> > access by ip (allow,deny).
> >
> > The first time when a allowed IP access this area (i.e. /downloads),
> > the object is cached, but when a unauthorized IP access the same
> > dir, it gets the object from cache.
> >
> > Is there a way to deal with that?
>
> At the http level:
>
> geo $not_allowed {
>    default 1;
>    127.0.0.1 0;
>    192.168.45.0/24 0;
> }
>
> Then add in the cache config:
>
> proxy_cache_bypass $not_allowed;
>
> --- appa
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120210/75cc1e3c/attachment.html>


More information about the nginx mailing list