Re: too many redirects

2014-11-21 Thread JACK LINKERS
Hi guys, if ($scheme = "http") { return 301 https://$server_name$request_uri; } Did the job indeed ! Thanks again all for your time and patience ! All the best ! 2014-11-21 20:29 GMT+01:00 Francis Daly : > On Fri, Nov 21, 2014 at 09:02:01AM +0100, JACK LINKERS wrote: > > Hi there, > >

rate limit with good bot IPs whitelisted

2014-11-21 Thread neubyr
I am trying to figure out if there is any way to rate limit all traffic except Googlebot, msnbot, yandex and baidu bots. Here is what I have started with: # Whitelisted IPs geo $rate_limit_ip { default $binary_remote_addr; 127.0.0.1 ""; 10.0.0.0/8 ""; } # Rate limit l

Re: rewrite or return for simple redirection

2014-11-21 Thread neubyr
On Fri, Nov 21, 2014 at 12:11 PM, Maxim Dounin wrote: > Hello! > > On Fri, Nov 21, 2014 at 12:06:54PM -0800, neubyr wrote: > > > On Fri, Nov 21, 2014 at 11:33 AM, Maxim Dounin > wrote: > > > > > Hello! > > > > > > On Fri, Nov 21, 2014 at 11:21:40AM -0800, neubyr wrote: > > > > > > > I am trying

Re: Use of worker_cpu_affinity in hyper-threading context

2014-11-21 Thread Alex
Hello Maxim, On 2014-11-21 20:23, Maxim Dounin wrote: Unless in your workload nginx is CPU-bound, I would recommend to let the OS scheduler to do the work. Thanks, than I will let the OS scheduler decide (in my workload, php5-fpm is CPU-bound). Again, appreciated your help! Alex _

Re: rewrite or return for simple redirection

2014-11-21 Thread Maxim Dounin
Hello! On Fri, Nov 21, 2014 at 12:06:54PM -0800, neubyr wrote: > On Fri, Nov 21, 2014 at 11:33 AM, Maxim Dounin wrote: > > > Hello! > > > > On Fri, Nov 21, 2014 at 11:21:40AM -0800, neubyr wrote: > > > > > I am trying to understand which option would result in more efficient > > HTTP > > > redi

Re: nginx performance with aritificial latency - help?

2014-11-21 Thread Maxim Dounin
Hello! On Fri, Nov 21, 2014 at 01:33:43PM -0600, Jacob Burkamper wrote: > This has been a bit of a learning experience for me, and as such I am not > currently too well versed in tweaking the Linux kernel's TCP code. However, > if the buffers were incorrect, I would expect to see dropped packets,

Re: rewrite or return for simple redirection

2014-11-21 Thread neubyr
On Fri, Nov 21, 2014 at 11:33 AM, Maxim Dounin wrote: > Hello! > > On Fri, Nov 21, 2014 at 11:21:40AM -0800, neubyr wrote: > > > I am trying to understand which option would result in more efficient > HTTP > > redirection. I am trying to redirect ^/address page to ^/contact page. > > > > Option 1

Re: nginx performance with aritificial latency - help?

2014-11-21 Thread Jacob Burkamper
This has been a bit of a learning experience for me, and as such I am not currently too well versed in tweaking the Linux kernel's TCP code. However, if the buffers were incorrect, I would expect to see dropped packets, correct? I took a packet capture of a simple ApacheBench test exhibiting the pr

Re: rewrite or return for simple redirection

2014-11-21 Thread Maxim Dounin
Hello! On Fri, Nov 21, 2014 at 11:21:40AM -0800, neubyr wrote: > I am trying to understand which option would result in more efficient HTTP > redirection. I am trying to redirect ^/address page to ^/contact page. > > Option 1: > rewrite ^/address /contact permanent; > > Option 2: > location ~ ^

Re: too many redirects

2014-11-21 Thread Francis Daly
On Fri, Nov 21, 2014 at 09:02:01AM +0100, JACK LINKERS wrote: Hi there, > As you can see, the template doesn't make separate server blocks for each > HTTP & HTTPS protocole : This part is still true: > > What you probably want is: > > > > listen on http; redirect everything to https. > > list

Re: Use of worker_cpu_affinity in hyper-threading context

2014-11-21 Thread Maxim Dounin
Hello! On Thu, Nov 20, 2014 at 07:37:56PM +0100, Alex wrote: > Hi, > > I have one E3-1240 v3 CPU here, which has 4 cores with hyper-threading > enabled. Currently I have the following setup in nginx.conf: > > worker_processes 4; > worker_cpu_affinity 1010 0101 1010 0101; > > In

Re: nginx performance with aritificial latency - help?

2014-11-21 Thread Maxim Dounin
Hello! On Thu, Nov 20, 2014 at 09:49:36PM -0600, Jacob Burkamper wrote: [...] > Does anyone have any suggestions on how I can solve this? I would have > expected an increase in the number of connections to yield an increase in > speed, but this was not the result. It seems with the artificial la

rewrite or return for simple redirection

2014-11-21 Thread neubyr
I am trying to understand which option would result in more efficient HTTP redirection. I am trying to redirect ^/address page to ^/contact page. Option 1: rewrite ^/address /contact permanent; Option 2: location ~ ^/address { return 301 $scheme://$host/contact } Which option should be preferr

Re: too many redirects

2014-11-21 Thread JACK LINKERS
Hi guys, This is not the first time I use this mailing list for support and it has always been very helpful. I might have forget to tell I'm using ISPConfig to setup my vhosts The .conf file is automaticaly generated, I only add some tuning to make different things work such as WordPress, PrestaS