Welcome! Log In Create A New Profile

Advanced

Re: .htaccess issues

February 12, 2012 10:34AM
On Fri, Feb 10, 2012 at 5:58 PM, António P. P. Almeida <appa@perusio.net>wrote:

> On 10 Fev 2012 19h40 WET, guilherme.e@gmail.com wrote:
>
> > Adrián,
> >
> > This would fix the problem, but I don't know the directories that
> > has a .htaccess file with allow/deny.
> >
> > Example:
> >
> > Scenario: nginx (cache/proxy) + back-end apache
> >
> > root@srv1 [~]# ls -a /home/domain/public_html/restrictedimages/ ./
> > ../ .htaccess image.jpg root@srv1 [~]# cat
> > /home/domain/public_html/restrictedimages/.htaccess allow from
> > x.x.x.x deny from all
> >
> > In the first access (source IP: x.x.x.x) to
> > http://domain.com/restrictedimages/image.jpg, nginx proxy request to
> > apache and cache response. The problem comes in other request from
> > other IP address different from x.x.x.x. Nginx deliver the objects
> > from cache, even if the ip address is not authorized, because nginx
> > doesn't understand .htaccess.
> >
> > I would like to bypass cache in this cases, maybe using
> > proxy_cache_bypass, but I don't know how. Any idea?
>
> I already gave you a suggestion. You just need to use a geo directive
> where you enumerate all the IPs that can **access**.
>
> AFAICT this foots the bill. No need to complicate it with headers
> being passed to the backend.
>
> --- appa
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>

Antonio, geo directive would be a great idea if I know the IPs that can
access the website (or directory), but the application is not mine, and the
customer can change this list (in .htaccess). In this case the ip list in
nginx would be outdated.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

.htaccess issues

Guilherme February 10, 2012 12:10PM

Re: .htaccess issues

António P. P. Almeida February 10, 2012 12:34PM

Re: .htaccess issues

Guilherme February 10, 2012 12:58PM

Re: .htaccess issues

António P. P. Almeida February 10, 2012 01:10PM

Re: .htaccess issues

Adrián Navarro February 10, 2012 01:10PM

Re: .htaccess issues

Guilherme February 10, 2012 02:42PM

Re: .htaccess issues

António P. P. Almeida February 10, 2012 03:00PM

Re: .htaccess issues

geberhart February 12, 2012 10:34AM

Re: .htaccess issues

António P. P. Almeida February 13, 2012 12:58PM

Re[4]: .htaccess issues

Max February 14, 2012 02:50AM

Re: Re[4]: .htaccess issues

António P. P. Almeida February 14, 2012 09:34AM

Re: Re[4]: .htaccess issues

António P. P. Almeida February 14, 2012 09:54AM

Re: Re[4]: .htaccess issues

geberhart February 14, 2012 11:48AM

Re[4]: .htaccess issues

Max February 12, 2012 08:06PM

Re[4]: .htaccess issues

Max February 12, 2012 08:10PM

Re[2]: .htaccess issues

Max February 10, 2012 03:10PM

Re: Re[2]: .htaccess issues

geberhart February 12, 2012 10:38AM

Re: .htaccess issues

Francis Daly February 12, 2012 11:50AM

Re[2]: .htaccess issues

Max February 13, 2012 04:14PM

Re: Re[2]: .htaccess issues

António P. P. Almeida February 13, 2012 04:46PM

Re[6]: .htaccess issues

Max February 14, 2012 07:38PM

Re: .htaccess issues

Piotr Sikora February 14, 2012 09:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready