Re: How can I limit the total speed of a port or domain name?

2013-04-04 Thread tssungeng
centos5.5 + nginx-1.3.14 I use the limit_speed_zone (https://github.com/yaoweibin/nginx_limit_speed_module),and set the nginx.conf: http { limit_speed_zone one $server_port 10m; server { listen 8080; server_name localhost; location / { root /op

"writev() failed (134: Transport endpoint is not connected)" when upstream down

2013-04-04 Thread Branden Visser
Hello, I've found that when there are upstream servers unavailable in my upstream group, applying a little bit of load on the server (i.e., just myself browsing around quickly, 2-3 req/s max) results in the following errors even for upstream servers that are available and well: 2013/04/04 22:02:21

Re: Nginx RP: a lot of rewrite rules

2013-04-04 Thread Francis Daly
On Thu, Apr 04, 2013 at 12:20:42PM +0200, Davide D'Amico wrote: > Il 04/04/13 11:34, Francis Daly ha scritto: > >On Thu, Apr 04, 2013 at 09:01:17AM +0200, Davide D'Amico wrote: Hi there, > >I suspect that the suggestions are increasingly more efficient -- but > >you presumably have the interest t

Re: nginx keeps crashing

2013-04-04 Thread Maxim Dounin
Hello! On Thu, Apr 04, 2013 at 10:21:57AM -0400, ankurs wrote: [...] > [root@localhost sbin]# ./nginx -V > nginx version: nginx/1.2.7 > built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) > configure arguments: --with-http_stub_status_module --with-http_perl_module > --with-http_flv_module --ad

nginx keeps crashing

2013-04-04 Thread ankurs
*** glibc detected *** nginx: worker process: double free or corruption (!prev): 0x08281500 *** === Backtrace: = /lib64/libc.so.6(+0x760e6)[0x7f10da7370e6] /lib64/libc.so.6(+0x78c13)[0x7f10da739c13] /lib64/libc.so.6(fclose+0x14d)[0x7f10da72774d] nginx: worker process[0x46db59] n

Re: upstream load balancing.

2013-04-04 Thread Maxim Dounin
Hello! On Thu, Apr 04, 2013 at 09:18:53AM +1300, Steve Holdoway wrote: > Folks, > > I'm sharing processing load across 3 remote servers, and am having a > terrible time getting it balanced. > > Here's the config > > upstream backend { > server 192.168.162.218:9000 fail_tim

SOLVED: securing access to a folder - 404 error

2013-04-04 Thread mottwsc
This is what was done to solve the problem. I am providing the two relevant location blocks. # protect the "secure" folder ( /var/www/html/secure ) location /secure/ { auth_basic "Restricted"; auth_basic_user_file /var/www/protected/.htpasswd; } # T

Re: proxy_cache_key and $content_length

2013-04-04 Thread ntib1
Ok, it's what I supposed but I was not sure. Is there an alternative ? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238097,238104#msg-238104 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Redirect 404 errors to the home page

2013-04-04 Thread johnnybut7
Thanks, ive already used this resources trying the below but it doesnt make a difference, the rails static page is still being served. I think maybe i need to disable that first, thanks for your help. error_page 404 =301 http://example.com/notfound.html; Posted at Nginx Forum: http://forum.ngin

Re: Redirect 404 errors to the home page

2013-04-04 Thread Jonathan Matthews
On 4 April 2013 11:40, johnnybut7 wrote: > Hi, > > Ive received a request stating that the website owner wants all 404 error > messages redirected to the home page as its affecting their seo ranking(im > not sure about this myself but thats another issue). Its a rails application > so i have stati

Re: proxy_cache_key and $content_length

2013-04-04 Thread Richard Kearsley
Hi That's a good idea but I think it's not possible The key is set before request is sent to backend but it can only know the content length after the request is sent to backend (catch 22) On 04/04/13 12:59, ntib1 wrote: Hi, I'd like to put $content_length in proxy_cache_key in order nginx to

proxy_cache_key and $content_length

2013-04-04 Thread ntib1
Hi, I'd like to put $content_length in proxy_cache_key in order nginx to check if file had changed and send it instead of old file if it's case. But the $content_length is always empty. Why ? Or do you have another solution for my problem ? Thanks, Thibaut Posted at Nginx Forum: http://foru

Redirect 404 errors to the home page

2013-04-04 Thread johnnybut7
Hi, Ive received a request stating that the website owner wants all 404 error messages redirected to the home page as its affecting their seo ranking(im not sure about this myself but thats another issue). Its a rails application so i have static page displayed currently and even applied some java

Aw: [semi-OT] GridFS uWSGI plugin

2013-04-04 Thread Elena Zwetkow
 Thanks for sharing, sounds really good.   Gesendet: Donnerstag, 04. April 2013 um 10:17 Uhr Von: "Roberto De Ioris" An: nginx@nginx.org Betreff: [semi-OT] GridFS uWSGI plugin Hi everyone, latest uWSGI release got GridFS support: https://uwsgi-docs.readthedocs.org/en/latest/GridFS.html In my c

Re: Nginx RP: a lot of rewrite rules

2013-04-04 Thread Davide D'Amico
Il 04/04/13 11:34, Francis Daly ha scritto: On Thu, Apr 04, 2013 at 09:01:17AM +0200, Davide D'Amico wrote: Hi there, Is it better to use (in terms of performances, reliability, load on the reverse proxy) the rewrite rules on the nginx reverse proxy, or use the rewrite rules on the apache22 ba

Re: Optimize rewrite

2013-04-04 Thread Reinis Rozitis
location / { rewrite^/(.*)/(.*)$ /$1/index.php?url=$2; } I would suggest to use try_files: location / { try_files $uri $uri/ /index.php?url=$uri&$args; } Personally instead of pasing the uri in the 'url' param I like to use try_files $uri $uri/ /index.php?$args; a

Re: Nginx RP: a lot of rewrite rules

2013-04-04 Thread Francis Daly
On Thu, Apr 04, 2013 at 09:01:17AM +0200, Davide D'Amico wrote: Hi there, > Is it better to use (in terms of performances, reliability, load on the > reverse proxy) the rewrite rules on the nginx reverse proxy, or use the > rewrite rules on the apache22 backend? Completely untested, but it see

Re: reset_timedout_connection

2013-04-04 Thread Дмитрий Шалашов
Thank you! Best regards, Dmitriy Shalashov 2013/4/4 Igor Sysoev > On Apr 4, 2013, at 12:46 , Дмитрий Шалашов wrote: > > Heeey :-) > > Is it safe to enable it? > > > Yes, it is safe. Probably, it should be enabled by default. > > > -- > Igor Sysoev > > 2013/3/29 Дмитрий Шалашов > >> Hi. >> >>

Re: reset_timedout_connection

2013-04-04 Thread Igor Sysoev
On Apr 4, 2013, at 12:46 , Дмитрий Шалашов wrote: > Heeey :-) > > Is it safe to enable it? Yes, it is safe. Probably, it should be enabled by default. -- Igor Sysoev > 2013/3/29 Дмитрий Шалашов > Hi. > > Why is this parameter disabled by default? > > Best regards, > Dmitriy Shalashov

Re: reset_timedout_connection

2013-04-04 Thread Дмитрий Шалашов
Heeey :-) Is it safe to enable it? Best regards, Dmitriy Shalashov 2013/3/29 Дмитрий Шалашов > Hi. > > Why is this parameter disabled by default? > > Best regards, > Dmitriy Shalashov > ___ nginx mailing list nginx@nginx.org http://mailman.nginx.or

url escape variable

2013-04-04 Thread Cristian Rusu
Hello I have this issue trying to use post_action My config is like this: location / { post_action /afterdownload; ... ... ... location /afterdownload { proxy_pass http://78.140.165.80/download_counter.php?FileName=$request&status=$request_completion ; internal

Re: How can I limit the total speed of a port or domain name?

2013-04-04 Thread Francis Daly
On Wed, Apr 03, 2013 at 09:58:57PM -0400, tssungeng wrote: Hi there, > You know,the ngx_http_limit_zone_module can limit the speed of an IP . Can it? If you can show your configuration that does that, then it should be straightforward to modify it to use the server port or server name instead

Re: Is it possible that nginx will not buffer the client body?

2013-04-04 Thread double
> Weibin: Have you thought of upstreaming the no_buffer patch to nginx 1.3.x > so it could become part of next nginx stable version 1.4 ? > It'd be really nice to have the no_buffer functionality in stock nginx! I agree. Nginx is such an excellent product - but this is a missing feature. Thanks M

[semi-OT] GridFS uWSGI plugin

2013-04-04 Thread Roberto De Ioris
Hi everyone, latest uWSGI release got GridFS support: https://uwsgi-docs.readthedocs.org/en/latest/GridFS.html In my company we are using it behind nginx for serving items from a replica set https://uwsgi-docs.readthedocs.org/en/latest/GridFS.html#combining-with-nginx Currently the plugin misse

Re: location vs. rewite

2013-04-04 Thread etrader
Anton Yuzhaninov Wrote: --- > > rewrite ^/favicon.ico /var/www/media/images/favicon.X.ico last; > > This is wrong - you can rewrite to other location, not to path on file > system. > Anyway rewrite does not need here, use location. Sorry, my ba

Nginx RP: a lot of rewrite rules

2013-04-04 Thread Davide D'Amico
Hi, I've two freebsd 9.1 vm (2 corees, 4gb ram) with nginx-1.2.7 in active/passive mode (using carp), acting as a reverse proxy to 4 apache22 backend (2 cores, 4gb ram). I should set 800 simple rewrite rules, such as: rewrite ^/something/foo.html /bar.html permanent; I cannot use any regexp t