Re[2]: Rewriting

2013-05-23 Thread wishmaster
Off course, you right. Thanks. if ($remote_addr !~ '190\.212\.201\.[0-9]{0,3}') { rewrite ^/(.*)$ /unav/$1 break; } location / { } But in log 2013/05/24 08:49:45 [error] 76017#0: *1910 open() "/usr/local/www/akbmaster/unav/unav/index.html" failed (2: No such file or dir

[ANN] ngx_openresty devel version 1.2.8.5 released

2013-05-23 Thread agentzh
Hello guys! I am happy to announce that the new development version of ngx_openresty, 1.2.8.5, is now released: http://openresty.org/#Download Special thanks go to all our contributors and users for helping make this release happen! Below is the complete change log for this release, as comp

proxy only certain assets based on host header?

2013-05-23 Thread amagad
We're trying to proxy only certain assets like png|jpg|css only when the host header is a certain DNS name. I tried to do this in the proxy.conf file using something the example below but it doesnt like the if statement. Is there a way to have nginx do what I am looking for? if ($http_host = dnsn

Re: Rewriting

2013-05-23 Thread Bozhidara Marinchovska
Hello, http://nginx.org/en/docs/http/request_processing.html Because in this case you need to place your rule in server block if you would like to be valid for all custom defined locations in your config For example: server { listen 80; if ($remote_addr ~ '192.168.1.25') { return 403; } loc

Rewriting

2013-05-23 Thread wishmaster
Hi, I use opencart with nginx+php-fpm. Sometimes it is necessary to redirect all clients, except admin (190.212.201.0/24), to "Service unavailable" page which is simple index.html file with logo, background image and some text, located in /unav directory. Below some of nginx.conf location / {

Re: NGINX error log format documentation

2013-05-23 Thread Francis Daly
On Thu, May 23, 2013 at 08:47:42PM +0200, Jan Teske wrote: Hi there, > I want to parse NGINX error logs. However, I did not find any > documentation concerning the used log format. less src/core/ngx_log.c should probably show most of what you need. Combine that with grep -r -A 2 ngx_log_

NGINX error log format documentation

2013-05-23 Thread Jan Teske
Hey! I want to parse NGINX error logs. However, I did not find any documentation concerning the used log format. While the meaning of some fields like the data is pretty obvious, for some it is not at all. In addition, I cannot be sure that my parser is complete if I do not have a documentati

Re: streaming request

2013-05-23 Thread Pasi Kärkkäinen
On Tue, May 21, 2013 at 05:33:29PM +0400, Maxim Dounin wrote: > Hello! > > On Tue, May 21, 2013 at 08:28:19AM -0400, pgte wrote: > > > Hi, > > > > I'm trying to do a streaming request that uses chunked encoding that gets > > forwarded to a back-end node.js http server. In this case the client do

Re: Updated cross-reference (LXR)

2013-05-23 Thread artemg
If somebody wants cross reference for other versions, here you can find for almost all versions on nginx http://osxr.org/ngx/source Posted at Nginx Forum: http://forum.nginx.org/read.php?2,220726,239479#msg-239479 ___ nginx mailing list nginx@nginx.org

Re: Override Content-Type header with proxied requests

2013-05-23 Thread António P . P . Almeida
Oops it's $upstream_http_content_type instead. Should read: map $upstream_http_content_type $s3_content_type { # S3 -> real... } appa On Thu, May 23, 2013 at 5:24 PM, António P. P. Almeida wrote: > Try this. > > At the http level define a map directive that maps upstream Content-Type

Re: Override Content-Type header with proxied requests

2013-05-23 Thread António P . P . Almeida
Try this. At the http level define a map directive that maps upstream Content-Types to the correct ones. map $upstream_content_type $s3_content_type { # S3 -> real... } On the location that proxy passes. proxy_hide_header Content-Type; add_header Content-Type $s3_content_type; appa

How to tell nginx to check dead backend in upstream adaptively?

2013-05-23 Thread Ryan Chan
Hi, Currently nginx will check every fail_timeout (default=10s) which is too frequent when the backend server dead completely that require manually replacement and it might take long time. Definitely we can mark it as down in the config, but that is not an automatic solution. Is it possible to c

Re: Override Content-Type header with proxied requests

2013-05-23 Thread Jonathan Matthews
Here's a thread I started on this a while back. I didn't get any replies. http://mailman.nginx.org/pipermail/nginx/2011-September/029344.html Jonathan -- Jonathan Matthews // Oxford, London, UK http://www.jpluscplusm.com/contact.html ___ nginx mailing

Override Content-Type header with proxied requests

2013-05-23 Thread andrea.mandolo
Hi !! i have a Nginx server that operates as a reverse proxy to a my bucket in Amazon S3. Amazon S3 service could deliver contents with wrong Content-Type header, so i would like to override this header by referring to file extension. In other servers i have just configured the "types" block wit