Re: rewrite with regex to use proxy_pass

2017-06-30 Thread Wandenberg Peixoto
If I'm not wrong the rewrite is applied only for the path, not for querystring. To parse the arguments using a regex use a map with $args as input or use the $arg_ARGNAME to the rewrite. On Jun 30, 2017 20:49, "Alexandre" wrote: > Do you have solutions for my problem ? > > Thank you very much. >

Re: fake googlebots

2016-09-25 Thread Wandenberg Peixoto
Some time ago I wrote this module <https://github.com/wandenberg/nginx-trusted-proxy-resolver-module> to check when an access is done through the Google Proxy using reverse DNS + DNS resolve and comparing the results to validate the access. You can do something similar. On Sun, Sep 25, 2016

Re: Nginx Caching Error Response Code like 400 , 500 , 503 ,etc

2016-08-07 Thread Wandenberg Peixoto
Check if your backend server is setting cache headers on errors like Cache-Control / Expires. Nginx by default uses these headers to know if the response should be cached or not. When these headers are not present it uses the configuration done with proxy_cache_valid. On Sun, Aug 7, 2016 at 9:43

Re: DNS Caching Issue For community version

2016-05-16 Thread Wandenberg Peixoto
You have to configure your nginx to use it like any other module. For instance, cd /Downloads/nginx ./configure --add-module=/Downloads/nginx-upstream-dynamic-servers-master make make install On May 16, 2016 01:28, "RT.Nat" wrote: > I cannot install the above module. > > /Downloads/nginx-upstream

Re: dns name for upstream

2016-03-19 Thread Wandenberg Peixoto
You can try to use this module to resolve the DNS ;) https://github.com/GUI/nginx-upstream-dynamic-servers On Wed, Mar 16, 2016 at 1:34 PM, Valentin V. Bartenev wrote: > On Friday 11 March 2016 07:01:49 Frank Liu wrote: > > Hi Valentin, > > Thanks for clearing up . I was looking at the wrong mod

Re: Problem with proxy cache misses

2016-02-29 Thread Wandenberg Peixoto
The location = / is a exactly match. To execute a "catch all" returning a 404 you can do a location / { return 404; } On Feb 29, 2016 16:15, "Payam Chychi" wrote: > Look at your proxy cache path... (proxy_cache_path /var/www/test_cache) > Are you sure the path exists and had proper perms/owner

Re: purger directive not available

2015-11-28 Thread Wandenberg Peixoto
This directive is available only on paid version Additionally, the following parameters are available as part of our commercial subscription : purger=on|off On Sat, Nov 28, 2015 at 8:10 AM, Dewangga Bachrul Alam < dewangg...@xtremenitro.org> wrote: > Hello! > > I am

Re: nginx: worker process is shutting down

2015-10-22 Thread Wandenberg Peixoto
Make sense On Thu, Oct 22, 2015 at 7:43 PM, Christos Chatzaras wrote: > I think I found a patch for this: > https://github.com/jrkettle/nginx-http-auth-digest/commit/6846a2a94b5497ec999a826618552717b3853bb9 > ___ > nginx mailing list > nginx@nginx.org

Re: Nginx and Apach2

2015-06-23 Thread Wandenberg Peixoto
Take a look on *port_in_redirect *and *proxy_pass * configuration. You probably have to do a proxy_pass to Apache and ensure that the port number is remo

Re: Nginx upstream delays

2015-03-09 Thread Wandenberg Peixoto
You also have to consider the rate your client get data from the server. The request time is the entire time spent from the beginning of the request until the end of response. So you may not have a problem on your server, just a lazy client :) On Mon, Mar 9, 2015 at 1:05 PM, B.R. wrote: > You ar

Re: Issues with HttpChunkinModule

2014-11-26 Thread Wandenberg Peixoto
Hey Arun, as docs says you do not need to compile this module anymore, or even try to set "chunkin on; " The nginx core will "detect" when your response does not have a Content-Length set, and will enable the chunk mode automatically. Just remove that line from your configuration and be happy :D

Re: Disable keep_alive based on specific useragent

2014-11-18 Thread Wandenberg Peixoto
Try to remove the last 's' This should work. map $http_user_agent $katimeout { default 300; } On Tue, Nov 18, 2014 at 2:25 AM, Robert Mueller wrote: > Hi > > Thanks for your responses. Unfortunately, they don't seem to work. > > > and then use the evil IF: > > if ($ios_ua) { > keepa

Re: How to disable access_log to images but log 404s

2014-10-30 Thread Wandenberg Peixoto
Try to set log_not_found to off On Thu, Oct 30, 2014 at 11:56 AM, Igal @ getRailo.org wrote: > hi, > > I am suppressing the access_log for images and other files in the /res/ > directory: > > location ^~ /res/ { > >

Re: How to make Nginx forget a hostname?

2014-10-12 Thread Wandenberg Peixoto
Did you execute a reload on nginx after remove the configuration file? On Oct 12, 2014 4:14 AM, "Francis Daly" wrote: > On Sat, Oct 11, 2014 at 06:23:28PM -0400, jbjares wrote: > > Hi there, > > > I'm with a issue related a removed configuration file for a specific > > hostname. So, I need to ass

Re: Distributed cache

2014-10-02 Thread Wandenberg Peixoto
Take a look on SRCache module if it is suitable for you. On Thu, Oct 2, 2014 at 9:24 AM, Bertrand Paquet wrote: > Hi, > > I need to have the same cache content on every frontend nodes. I'm seeking > a solution to do what the nginx proxy cache does, but i

Re: Weird behavior when checking the existence of a cookie

2014-09-26 Thread Wandenberg Peixoto
By default the $uri is appended to the proxy_pass directive. Since you defined as proxy_pass http://upstream*/*; and the $uri starts with a slash you will have a double slash. Try to set proxy_pass like proxy_pass http://upstream; On Fri, Sep 26, 2014 at 2:02 PM, Marcello Rocha wrote: > Hi list

Re: [nginx module] Save response into temp file

2014-09-24 Thread Wandenberg Peixoto
As your snippet is very short I cannot be sure but some questions to guide on debugging - did you closed the file when finished to write? some bytes may be in buffer and will be flushed after the close. - the m->chain was used before to write its content to other place? If yes, may be necessary to

Re: How to call redis2-nginx-module or any other module from another module

2014-08-12 Thread Wandenberg Peixoto
e like lua. If you are ok with your client receiving this kind of answer you do not have to worry. On Tue, Aug 12, 2014 at 10:36 AM, ajaybodhe wrote: > Thanks @wandenberg. > > Can you clarify more on, what do you mean by getting the value from > "config" > : > > Bu

Re: How to call redis2-nginx-module or any other module from another module

2014-08-12 Thread Wandenberg Peixoto
If you need to call redis from your code, you can take a look on redis_nginx_adapter <https://github.com/wandenberg/redis_nginx_adapter>. But, if you want to get the value from your "config" and use it there, probably you have to use some other language like perl or lua, I'm n

Re: Override Content-Type header with proxied requests

2014-08-08 Thread Wandenberg Peixoto
ver. On Fri, Aug 8, 2014 at 10:23 AM, manish-ezest wrote: > Hello wandenberg, > > This procedure is not working for internet explorer. The CSS are not > loading > properly. so we have to somehow get the Content-Type in the header. Is > there > anything we can use? >

Re: Override Content-Type header with proxied requests

2014-08-07 Thread Wandenberg Peixoto
Did you tried to only hide the header with proxy_hide_header Content-Type; and let nginx use the mime.types to set the content type? Do not set the add_header Content-Type manually. Let me know the result. On Thu, Aug 7, 2014 at 12:57 PM, manish-ezest wrote: > Hello wandenberg, > >

Re: Override Content-Type header with proxied requests

2014-08-06 Thread Wandenberg Peixoto
Hello, you can use many values on the map, take a look on its docs. One quickly example may be (not tested) map $uri $custom_content_type { default "text/html"; ~(.*\.json)$ "application/json"; } location ~ \.json$ { proxy_hide_header Content-Type; add_header Content-Typ

Re: Why cannot the same path for cache be used several times?

2014-08-06 Thread Wandenberg Peixoto
Hi, The key_zone is just the name of a shared memory area where some metadata about the cache entries will be saved. The files stored on the cache_path does not use the key_zone. They are different configurations to two different purposes. To do what you are imagining, the file stored on cache_p

Re: pid file location even after setting pid directive

2014-08-01 Thread Wandenberg Peixoto
The configuration file used to start the server is the same been used to stop it? If you start as nginx -c /some/confi/file.conf and stop as nginx -c /some/confi/file.conf -s stop it should work. If you are only doing nginx -s stop it will use default configuration that point to another pid file

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

2014-07-31 Thread wandenberg
nt ip using the reverse dns and, if the ip came from Google, I change it for the first ip on XFowardedFor header. Doing that, the GeoIP module can be executed with the "real ip" instead of the Google. If you want to look how I did, the code is here https://github.com/wandenberg/ngin