Order of directive call during request handling

2014-06-16 Thread Adarsh Pugalia
I am not able to get the order in which the directive handlers are called when a request comes. I have a directive to connect to the database and the other to do put operation. In the conf file, i write the connect directive first, but when request comes, the connect directive handler is not

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

2014-06-16 Thread Rv Rv
Hello Maxim Thanks for the response. As previously suggested, you should consider using merge callbacksto validate configuration instead. The requirement is *not* to validate the configuration. The requirement is to find the final value set by one of the directives once the configuration has

nginx +

2014-06-16 Thread Steve Holdoway
Sorry to ask this, but does using this *require* a support contract? I'm interested in the streaming stuff, but it's not worth $1300/yr to me... Cheers, Steve -- Steve Holdoway BSc(Hons) MIITP http://www.greengecko.co.nz Linkedin: http://www.linkedin.com/in/steveholdoway Skype: sholdowa

RE: GeoIP FirstNonPrivateXForwardedForIP

2014-06-16 Thread Lukas Tribus
Hi, Thanks for your reply. I have already tried http://nginx.org/en/docs/http/ngx_http_geoip_module.html#geoip_proxy But this needs a list of subnets / networks to be whitelisted first as a trusted source. I do not (Can not) have a list of such networks as they can be intermediate proxy

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

2014-06-16 Thread Keyur
Hi Lucas, Noted! Agreed! How do I tell nginx to do GeoIP on FirstNonPrivateXForwardedForIP ? Regards, Keyur Posted at Nginx Forum: http://forum.nginx.org/read.php?2,250823,250876#msg-250876 ___ nginx mailing list nginx@nginx.org

nginx -s reload problem

2014-06-16 Thread Harold.Miao
hi all I use a endless rtmp stream /usr/local/nginx/wsgi/ffmpeg -i haha.mp4 -c:v libx264 -b:v 500k -c:a copy -f flv rtmp://172.16.205.50:1936/publish/you as you known, if I use nginx -s reload , then I got a lot of nginx: worker process is shutting down pplive 15355 13642 0 14:56 ?

How to redirect error page (html) self built html error page

2014-06-16 Thread mknazri
Hi everyone, Sorry for my english. My scenario like below ; I setup my webserver in cloud and I have my ERP server running at different DC. The connection from cloud to DC is very fast, no interuption at all. When my customer access www.example.com it will show the website that i build in cloud

Re: How to redirect error page (html) self built html error page

2014-06-16 Thread Axel
Hi, Am Montag, 16. Juni 2014, 05:14:59 schrieb mknazri: Hi everyone, Sorry for my english. My scenario like below ; I setup my webserver in cloud and I have my ERP server running at different DC. The connection from cloud to DC is very fast, no interuption at all. When my customer

Re: How to redirect error page (html) self built html error page

2014-06-16 Thread mknazri
Hi Axel, This is my nginx conf in /etc/nginx/sites-available/erp; upstream webserver { server 127.0.0.1:8078 weight=1 fail_timeout=300s; } server { listen 80; server_name example.com; location / { proxy_pass http://127.0.0.1:5000; proxy_set_headerHost

Re: tmp directory filling up

2014-06-16 Thread Andrei Belov
On 11 Jun 2014, at 23:23, Maxim Dounin mdou...@mdounin.ru wrote: Hello! On Wed, Jun 11, 2014 at 10:58:47AM -0400, Tatonka wrote: Hi, I have a rails application that is hosted through nginx and passenger. In this application I want provide very large files for the users to download

Re: ngx_http_process_header_line function in source code

2014-06-16 Thread Maxim Dounin
Hello! On Sun, Jun 15, 2014 at 06:03:27PM -0400, alayim wrote: Hi, I'm browsing through the source code of the project, and looked at ngx_http_request.c where the function ngx_http_process_header_line() creates a pointer to a pointer to a large struct(ngx_http_request_t) containing a

Re: Order of directive call during request handling

2014-06-16 Thread Maxim Dounin
Hello! On Mon, Jun 16, 2014 at 12:23:44PM +0530, Adarsh Pugalia wrote: I am not able to get the order in which the directive handlers are called when a request comes. I have a directive to connect to the database and the other to do put operation. In the conf file, i write the connect

Really high disk i/o !!

2014-06-16 Thread shahzaib shahzaib
Our server HDD i/o is constant on 8MB/s and i/o utilization + await is very high due to which nginx video streaming is really slow and we're receiving complains from our users regarding slow streaming of the videos. We're using 12X3TB SATA HDD Hardware-Raid10 with 16G RAM OS Centos 6.4 8MB/s

Re: Really high disk i/o !!

2014-06-16 Thread Richard Kearsley
On 16/06/14 12:49, shahzaib shahzaib wrote: 8MB/s w/r should not be issue for 12X3TB SATA HDD. Maybe i need to tweak some nginx buffers or kernels in order to reduce the high io wait ? if you have a high number of concurrent connections and/or use limit_rate, then expect hdd (sata or sas)

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

2014-06-16 Thread Maxim Dounin
Hello! On Mon, Jun 16, 2014 at 02:58:50PM +0800, Rv Rv wrote: Hello Maxim Thanks for the response. As previously suggested, you should consider using merge callbacksto validate configuration instead. The requirement is *not* to validate the configuration. The requirement is to find

Re: tmp directory filling up

2014-06-16 Thread Maxim Dounin
Hello! On Mon, Jun 16, 2014 at 03:22:11PM +0400, Andrei Belov wrote: On 11 Jun 2014, at 23:23, Maxim Dounin mdou...@mdounin.ru wrote: Hello! On Wed, Jun 11, 2014 at 10:58:47AM -0400, Tatonka wrote: Hi, I have a rails application that is hosted through nginx and passenger.

Re: nginx +

2014-06-16 Thread sarah.novotny
Hello Steve! From: Steve Holdoway st...@greengecko.co.nz Sorry to ask this, but does using this *require* a support contract? I'm interested in the streaming stuff, but it's not worth $1300/yr to me... At this point we only offer a combined license and support model at the $1350/yr price

rewrite url in upstream block

2014-06-16 Thread Gona
Hi, I am using a query parameter in upstream module to serve request based on consistent hashing. This query parameter is introduced in the request handler module and not originally coming from the downstream. I would like to remove this parameter once the job is done before sending it to an

Re: Caching servers in Local ISPs !!

2014-06-16 Thread shahzaib shahzaib
Hello itpp,i have been abled to use ngx_http_geo_module. Now the request coming from local ISP will first go to the main server (US) and then main server will check if the ip is 1.2.3.4 so it'll direct the request to the local caching server and than caching server will check if the file is

Re: Really high disk i/o !!

2014-06-16 Thread Stefan Parvu
If they are wrapped up in iowait then you need a faster seeking disk (e.g. ssd because sas won't give you a significant amount extra) or need to tune something. You don't necessarily need to change always the hdw if you have high iowaits. There are many variables around. -- Stefan Parvu

Re: Caching servers in Local ISPs !!

2014-06-16 Thread itpp2012
shahzaib1232 Wrote: --- Maybe i need to add some variable to get original server ip ? https://www.google.nl/#q=nginx+geo+remote+ip+address http://www.cyberciti.biz/faq/nginx-redirect-backend-traffic-based-upon-client-ip-address/ Posted at

Problem with big files

2014-06-16 Thread jakubp
Hi Recently I hit quite big problem with huge files. Nginx is a cache fronting an origin which serves huge files (several GB). Clients use mostly range requests (often to get parts towards the end of the file) and I use a patch Maxim provided some time ago allowing range requests to receive HTTP

Re: Problem with big files

2014-06-16 Thread Justin Dorfman
I use a patch Maxim provided some time ago allowing range requests to receive HTTP 206 if a resource is not in cache but it's determined to be cacheable... Can you please link to this patch? Regards, Justin Dorfman http://www.twitter.com/jdorfman Director of Developer Relations MaxCDN

Re: how to set timer?

2014-06-16 Thread vickyma
how works? i lost. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4265,250903#msg-250903 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

upstream on OpenBSD not executing requests

2014-06-16 Thread roman_mir
Hello everybody! I am a new and excited nginx user and I just had to hit a problem complex enough for me to post a message here hoping to get some help. OS: OpenBSD 5.5 amd64 nginx -v: nginx version: nginx/1.4.7 nginx.conf: user www; worker_processes 10; error_log /var/log/nginx/error.log

Re: Об одной малоизвестной уязвимости в веб сайтах

2014-06-16 Thread Maxim Dounin
Hello! On Sun, Jun 15, 2014 at 11:07:58PM +0300, Gena Makhomed wrote: On 14.06.2014 21:14, Maxim Dounin wrote: http://habrahabr.ru/post/166855/ ... Прокси-сервер, помимо всего прочего, является сервером, и процитированное требование вернуть 400 в ответ на Host header field with an

Re: Об одной малоизвестной уязвимости в веб сайтах

2014-06-16 Thread S.A.N
Maxim Dounin Wrote: --- Какая-либо проблема появляется тогда и только тогда, когда администратор начинает писать в конфиге $http_host, не думая о последствиях. Есть мнение, что совсем простое решение этой проблемы - не делать так (c)

Re: Об одной малоизвестной уязвимости в веб сайтах

2014-06-16 Thread Maxim Dounin
Hello! On Mon, Jun 16, 2014 at 11:19:57AM -0400, S.A.N wrote: Maxim Dounin Wrote: --- Какая-либо проблема появляется тогда и только тогда, когда администратор начинает писать в конфиге $http_host, не думая о последствиях. Есть

Re: Об одной малоизвестной уязвимости в веб сайтах

2014-06-16 Thread S.A.N
Maxim Dounin Wrote: --- Какая-либо проблема появляется тогда и только тогда, когда администратор начинает писать в конфиге $http_host, не думая о последствиях. Есть мнение, что совсем простое решение этой проблемы - не делать

Re: Об одной малоизвестной уязвимости в веб сайтах

2014-06-16 Thread Gena Makhomed
On 16.06.2014 15:00, Maxim Dounin wrote: озвученные в RFC 7230 требования к клиенту: http://tools.ietf.org/html/rfc7230#section-5.4 A client MUST send a Host header field in all HTTP/1.1 request messages. If the target URI includes an authority component, then a client MUST send