Re: Nginx location for not exists php files

2014-06-12 Thread Francis Daly
On Thu, Jun 12, 2014 at 08:51:32AM -0400, Khmelevsky wrote: Hi there, > But if url, for example, /help.php or contacts.php, and this files not > exists, i have output > > File not found. > How update my nginx config? I need urls, for example: Untested, but: put try_files $uri /index.php?rou

RE: GeoIP FirstNonPrivateXForwardedForIP

2014-06-12 Thread Lukas Tribus
> Hi, > > My website does country based redirection based on result obtained from > GeoIP against IP. > > I am facing a problem where GeoIP does not work as first IP in the > X-Forwarded-For has Private network address. (Say 192.168.1.1) > > I know GeoIP on private network would fail but the X-Forw

GeoIP FirstNonPrivateXForwardedForIP

2014-06-12 Thread Keyur
Hi, My website does country based redirection based on result obtained from GeoIP against IP. I am facing a problem where GeoIP does not work as first IP in the X-Forwarded-For has Private network address. (Say 192.168.1.1) I know GeoIP on private network would fail but the X-Forwarded-For also

Re: Rewrite rules from Apache again

2014-06-12 Thread Luciano Mannucci
On Wed, 11 Jun 2014 18:05:50 +0100 Francis Daly wrote: On Wed, 11 Jun 2014 18:05:50 +0100 Francis Daly wrote: > The rewrite that you want doesn't happen, because the request > /en/privacy.php is handled in: > > > location ~ \.php$ { > > location / { > > location ^~ /e

Nginx location for not exists php files

2014-06-12 Thread Khmelevsky
I have config(minimal): server { listen test.local:80; server_name test.local; server_name_in_redirect off; location / { root /data/www/test/public; try_files $uri $uri/ /index.php?route=$uri&$args; index index.html index.php; } location ~ \.php$ { root /data/www

proxy_redirect vs. relative URLs from upstream

2014-06-12 Thread m irya
Hi, I'm trying to create a sinle proxying configuration as following: location = /proxy { resolver 8.8.8.8; proxy_pass $args; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_redirect "" $uri?; } e

Re: proxy_pass to different upstreams based on a cookie in the http request header

2014-06-12 Thread Kunal Pariani
Thanks for your answer. Worked great for me.. On Wed, Jun 11, 2014 at 10:10 AM, Francis Daly wrote: > On Wed, Jun 11, 2014 at 12:46:41AM -0700, Kunal Pariani wrote: > > Hi there, > > > Am wondering if there is a way to proxy (i.e proxy_pass inside location > > directive) to different set of ups