Re: Transforming nginx for Windows

2014-09-02 Thread itpp2012
nginx for Windows, one year on… Time flies when you’re having fun :) one year down the road transforming nginx, rewriting, re-developing, crashing, heavy battles with compilers, add-on’s, c++ restrictions, ngxLuaDB powered by nginx for Windows, cross compiler, multi node imports… and yet here we a

Re: Socket connection failures on 1.6.1~precise

2014-09-02 Thread Jon Clayton
I did see the changelog hadn't noted many changes and running a diff of the versions shows what you mentioned regarding the 400 bad request handling code. I'm not necessarily stating that nginx is the problem, but it would seem like something had changed enough to cause the backend's backlog t

Re: Understanding "proxy_ignore_client_abort" functionality

2014-09-02 Thread shmulik
Thank you very much for the clarification. So if i understand correctly, the only way to achieve my original goal, without modifying the code is to use "proxy_store" - which is actually for saving the content to disk, but as a side effect will keep the connection to upstream going even if the clie

Re: Get Selected backend info

2014-09-02 Thread Maxim Dounin
Hello! On Wed, Sep 03, 2014 at 12:50:27AM +0500, Aleem B wrote: > Hello, > > I couldn't find much information other than this thread > which > is a dead-end. > > I would like to add the selected backend/upstream to an "X-Backe

Get Selected backend info

2014-09-02 Thread Aleem B
Hello, I couldn't find much information other than this thread which is a dead-end. I would like to add the selected backend/upstream to an "X-Backend" header before dispatching the request to the backend. In Varnish I can do t

Re: Understanding "proxy_ignore_client_abort" functionality

2014-09-02 Thread Maxim Dounin
Hello! On Tue, Sep 02, 2014 at 12:57:15PM -0400, shmulik wrote: > Hi, > I'm trying to understand how "proxy_ignore_client_abort" should affect > connection to upstream server once client closes the connection, since it > seems to behave different than i'm expecting. [...] > 3. And the part that

Re: proxy of "real_ip"

2014-09-02 Thread Maxim Dounin
Hello! On Tue, Sep 02, 2014 at 12:29:06PM -0400, double wrote: > Hello, > Is there a variable which stores the IP address of the proxy if I use the > real-ip module. > E.g. to log the client-ip as well as the proxy-ip (the IP address of the > physical connection). > Thanks a lot! No. -- Maxim

Re: Socket connection failures on 1.6.1~precise

2014-09-02 Thread Maxim Dounin
Hello! On Tue, Sep 02, 2014 at 11:00:10AM -0500, Jon Clayton wrote: > I'm trying to track down an issue that is being presented only when I run > nginx version 1.6.1-1~precise. My nodes running 1.6.0-1~precise do not > display this issue, but freshly created servers are getting floods of these >

Understanding "proxy_ignore_client_abort" functionality

2014-09-02 Thread shmulik
Hi, I'm trying to understand how "proxy_ignore_client_abort" should affect connection to upstream server once client closes the connection, since it seems to behave different than i'm expecting. I'm using the proxy module, with buffering on and proxy_ignore_client_abort on as well (proxy_store off

Re: Deny certain words

2014-09-02 Thread Grozdan
On Tue, Sep 2, 2014 at 3:09 PM, Maxim Dounin wrote: > Hello! > > On Tue, Sep 02, 2014 at 12:17:12PM +0100, Steve Wilson wrote: > >> Torrent clients have their own user agent normally, I had a need a while >> back to block some which we used the magic 444 to kill it. >> >> if ($http_user_agent ~* (

proxy of "real_ip"

2014-09-02 Thread double
Hello, Is there a variable which stores the IP address of the proxy if I use the real-ip module. E.g. to log the client-ip as well as the proxy-ip (the IP address of the physical connection). Thanks a lot! Posted at Nginx Forum: http://forum.nginx.org/read.php?2,253024,253024#msg-253024

Socket connection failures on 1.6.1~precise

2014-09-02 Thread Jon Clayton
I'm trying to track down an issue that is being presented only when I run nginx version 1.6.1-1~precise. My nodes running 1.6.0-1~precise do not display this issue, but freshly created servers are getting floods of these socket connection issues a couple times a day. /connect() to unix:/tmp/u

Nginw + FastCGIwrap = 502 bad gateway

2014-09-02 Thread Otyugh
Greetings, I'm trying to get a C compiled program to work using fcgi with nginx, but I'm showed a 502 Bad Gateway. The actual setup is : all programs in ./cgi-bin/*.cgi should use fcgiwarp. The actual result is every adress matching report 502 Bad Gateway. I'm not sure of what I am missing :s

Re: NGINX redirection issue

2014-09-02 Thread Maxim Dounin
Hello! On Mon, Sep 01, 2014 at 02:05:46PM -0400, manish-ezest wrote: > Hello Maxim, > > Like you suggested I have set "recursive_error_pages" to off but still I am > facing the problem. This time I am getting "504 Gateway Time-out" error. I > have already shared my NGINX and vhost configuration.

Re: Deny certain words

2014-09-02 Thread Maxim Dounin
Hello! On Tue, Sep 02, 2014 at 12:17:12PM +0100, Steve Wilson wrote: > Torrent clients have their own user agent normally, I had a need a while > back to block some which we used the magic 444 to kill it. > > if ($http_user_agent ~* (uTorrent|Transmission) ) { > return 444; > break; > } Just

Re: terminate a connection after sending headers

2014-09-02 Thread Maxim Dounin
Hello! On Mon, Sep 01, 2014 at 05:25:56PM -0400, erankor2 wrote: > Hi all, > > In the module I'm developing, I have the possibility of encountering an > error after the response headers were already sent. As the headers were > already sent (with status 200) the only way for me to signal the erro

Re: Deny certain words

2014-09-02 Thread Grozdan
On Tue, Sep 2, 2014 at 1:17 PM, Steve Wilson wrote: > Torrent clients have their own user agent normally, I had a need a while > back to block some which we used the magic 444 to kill it. > > if ($http_user_agent ~* (uTorrent|Transmission) ) { > return 444; > break; > > } Thanks. That seems to

Re: Deny certain words

2014-09-02 Thread Steve Wilson
Torrent clients have their own user agent normally, I had a need a while back to block some which we used the magic 444 to kill it. if ($http_user_agent ~* (uTorrent|Transmission) ) { return 444; break; } On 02/09/2014 12:08, Grozdan wrote: Hi, Somehow my server gets hit by torrent requests

Deny certain words

2014-09-02 Thread Grozdan
Hi, Somehow my server gets hit by torrent requests which look like this: GET /?info_hash=. after the = come long strings of seemingly random hashes torrent clients are looking for. I'd like to deny all such requests so would like if someone could provide me how to deny everything (and inclu

Re: Hide a request cookie in proxy_pass

2014-09-02 Thread gthb
Yep, works like a charm, thank you! And two consecutive ifs to strip two cookies works as well: set $stripped_cookie $http_cookie; if ($http_cookie ~ "(.*)(?:^|;)\s*sessionid=[^;]+(.*)$") { set $stripped_cookie $1$2; } if ($stripped_cookie ~ "(.*)(?:^|;)\s*csrftoken=[^;]+(.

redirect only every 2nd or 3rd request

2014-09-02 Thread laszlo
I'm trying to set up a rule which is going to redirect only every second or third request only if the URL contains a specific string. I did already the redirect based on a string in the URL but I can't find how to redirect only every second on third request: if ($request_uri ~ .*.WHATEVER_STRING

Re: Compression with Caching

2014-09-02 Thread nginxsantos
Thanks I am not sure why we don't first compress and then store the same in the cache. In this way, we don't have to compress the content each time (if the client is asking for a gzipped content) before sending to client. I am not able to understand why it is currently designed thisway, Post