Re: Allow and Deny IP's

2018-02-05 Thread Ph. Gras
Hello there! location ~* wp-login\.php$ { allow 127.0.0.1; allow A.B.C.D; // My server's IP allow E.F.G.H/13; // The IP range where I am deny all; if ($http_user_agent = "-") { return 403;} if ($http_user_agent = "") { return

Re: nginx cache issue (http upstream cache: -5)

2018-02-05 Thread loopback_proxy
Ahhh interesting, that did the trick. Thank you so much. I have been also trying to understand the internals of nginx caching and how it works. I read the nginx blog about the overall architecture and the nginx man page about proxy_cache_* directives. I am looking for the internal architecture of

Allow and Deny IP's

2018-02-05 Thread Kaushal Shriyan
Hi, When i run this curl call -> curl -X GET http://13.127.165.226/ -H 'cache-control: no-cache' -H 'postman-token: 2494a4a7-6791-2426-cedf-d0bcaa1cd90a' -H 'x-forwarded-for: 12.12.12.13.11' Ideally the request should not be allowed and the access log should report 403 instead of 200 I get 200 OK

Re: nginx cache issue (http upstream cache: -5)

2018-02-05 Thread Maxim Dounin
Hello! On Mon, Feb 05, 2018 at 04:08:33AM -0500, loopback_proxy wrote: > I am new to nginx caching but have worked with nginx a lot. I tried enabling > caching feature in our repository but it never worked so I thought I will > pull a fresh copy of nginx and turn it on. I ended with the same issu

Re: nginx cache issue (http upstream cache: -5)

2018-02-05 Thread Pratyush Kumar
What's the permission for /tmp/nginx ?On 05-Feb-2018 14:38, loopback_proxy wrote:I am new to nginx caching but have worked with nginx a lot. I tried enabling caching feature in our repository but it never worked so I thought I will pull a fresh copy of nginx and turn it on. I ended with the same

Re: N00b: Forwarding the full request to upstream server

2018-02-05 Thread loopback_proxy
You could just do proxy_pass http://192.168.10.34$request_uri See this for more https://nginx.org/en/docs/http/ngx_http_core_module.html#var_request_uri Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278344,278347#msg-278347 ___ nginx ma

nginx cache issue (http upstream cache: -5)

2018-02-05 Thread loopback_proxy
I am new to nginx caching but have worked with nginx a lot. I tried enabling caching feature in our repository but it never worked so I thought I will pull a fresh copy of nginx and turn it on. I ended with the same issue. For some reason, nginx is not able to create the cache file in the cache dir