Want to access UNIX environment variable

2013-02-26 Thread amodpandey
Hi, I have system where I have defined OS environment variable $ENV=prod or dev. I want to access this variable inside my nginx configuration. Please help. I have tried -g "env ENV" in command line. But how do I access it? $ENV does not work? Posted at Nginx Forum: http://forum.nginx.org/read.p

Re: rds-json generate json with index key on first level of array

2013-02-26 Thread Mauro Stettler
Thanks for the reply agentzh, Ok, I'll probably implement this either on lua in the Nginx or on the client side inside the javascript then. Will have to do some tests of both solutions to decide. Regards, Mauro On Tue, Feb 26, 2013 at 4:03 AM, agentzh wrote: > Hello! > > On Mon, Feb 25, 2013

Re: Using Nginx auth in PHP scripts

2013-02-26 Thread B.R.
Thanks for your great help! Now I think I got it all. Well it was non-sense to put fastcgi out of the PHP location anyway... but I didn't know about the environment problem. I'll try to think about that next time something I play with Nginx configuration. Everything is OK now. --- *B. R.* On T

Re: Proxy without buffering

2013-02-26 Thread xinghua_hi
Hello, I have two questions. 1. why does backend has troubles to parse request? because parsing huge request make heavy load? 2. why haproxy in front nginx can workaround the issue? I think nginx will still buffer the request to temp file Thanks a lot Posted at Nginx Forum: http://forum.nginx.

Re: Using Nginx auth in PHP scripts

2013-02-26 Thread Francis Daly
On Tue, Feb 26, 2013 at 05:26:49PM -0500, B.R. wrote: > I feel like I am a noob... oO The problem is due to how nginx directives are inherited to different levels. It's consistent within nginx, so once you learn it you can apply it to all directives which inherit. Just put your new fastcgi_param

Re: Using Nginx auth in PHP scripts

2013-02-26 Thread B.R.
Thanks to both of you, I got the info I was seeking for. However, when I try to activate the fastcgi_param, the content doesn't seem to reach PHP anymore. No error logged neither in Nginx nor PHP it seems. I feel like I am a noob... oO server { listen 80; server_name

Re: Using Nginx auth in PHP scripts

2013-02-26 Thread Steve Holdoway
It's my understanding the $remote_user is available. Sorry, a poor example. Could have used one that answers your question directly... Steve On Tue, 2013-02-26 at 16:23 -0500, B.R. wrote: > Thanks, I learned something there. > > But does the auth_basic module allows you to load the username in

Re: Using Nginx auth in PHP scripts

2013-02-26 Thread Francis Daly
On Tue, Feb 26, 2013 at 04:23:14PM -0500, B.R. wrote: Hi there, > But does the auth_basic > moduleallows > you to load the username in a Nginx variable? > From what I understand everything is processed internally. http://nginx.org/en

Re: Using Nginx auth in PHP scripts

2013-02-26 Thread B.R.
Thanks, I learned something there. But does the auth_basic moduleallows you to load the username in a Nginx variable? >From what I understand everything is processed internally. --- *B. R.* On Tue, Feb 26, 2013 at 4:15 PM, Steve Hol

Re: Using Nginx auth in PHP scripts

2013-02-26 Thread Steve Holdoway
You can pass environment vars to PHP no problem... Eg: if you set up geoip in nginx.conf geoip_country /usr/share/GeoIP/GeoIP.dat; this makes $geoip_country_code available to your nginx config. If you then set fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code; then $_SERVER['GEO

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

2013-02-26 Thread double
This would be an excellent feature! Posted at Nginx Forum: http://forum.nginx.org/read.php?2,234926,236640#msg-236640 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Using Nginx auth in PHP scripts

2013-02-26 Thread B.R.
Hello, The only information I got on the Web was to protect folders with Nginx auth, just like the plein old Apache's .htaccess. I am already using AuthPlain to secure a folder with Nginx, using PHP scripts inside. I wonder if it was possible to use Nginx auth information inside those PHP scripts

FastCGI stderr being truncated

2013-02-26 Thread aschlosberg
Whilst investigating a series of 502 errors I have noticed that related error messages from FastCGI stderr are being truncated and at other times the error logging seems to fail part way. Example: 2013/02/25 09:33:14 [error] 2032#0: *29484 FastCGI sent in stderr: "o/au/com/***domain-censored***/_p

Re: Virtualhosts and map

2013-02-26 Thread Jonathan Matthews
On 26 February 2013 09:31, Varix wrote: > What is the best way to configure virtualhost with map? The question you have asked is very wide-ranging yet vague. The only answer I can give you is "it depends on what you're trying to achieve". I suggest you formulate a better question. If you includ

Re: Optimal nginx settings for websockets sending images

2013-02-26 Thread Maxim Dounin
Hello! On Mon, Feb 25, 2013 at 10:15:55PM -0500, michael.heuberger wrote: > The recent nginx 1.3.13 websocket support is fantastic! Big thanks to the > nginx devs, it works like a charm. Good to hear. :) > I only have performance issues. Sending images through websockets turns out > to be diff

Re: Problem with proxy_set_header $ssl_client_cert

2013-02-26 Thread Lynoure
Thank you Sergey, this workaround suffices for us for now. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236546,236618#msg-236618 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

lua-resty-upload instead of HttpUploadModule?

2013-02-26 Thread Alina Eriksson
Hello nginx users,i see there is a new lua-module for nginx-lua, the lua-resty-upload module. Compiling theHttpUploadModule ends sometimes (new version of nginx) in errors, so i consider to uselua-resty-upload module because i use some lua functions already. I am not so confirm with lua, and see, t

Re: Floating Point

2013-02-26 Thread Igor Sysoev
On Feb 26, 2013, at 13:32 , Aparna Bhat wrote: > I am working on a module for load balancing. I have to make use of the type > float. Can anyone please tell me if there is any nginx specific data type for > float such as the one that exists for int (ngx_int_t). I would also like to > know how t

Re: Floating Point

2013-02-26 Thread Benjamin Saiz
Default precision for %f is 6 digits (ISO C99) what's your test case ? On Tue, Feb 26, 2013 at 10:32 AM, Aparna Bhat wrote: > Hi, > > I am working on a module for load balancing. I have to make use of the > type float. Can anyone please tell me if there is any nginx specific data > type for fl

Floating Point

2013-02-26 Thread Aparna Bhat
Hi, I am working on a module for load balancing. I have to make use of the type float. Can anyone please tell me if there is any nginx specific data type for float such as the one that exists for int (ngx_int_t). I would also like to know how to write the float value to the logs. The type %f print

Virtualhosts and map

2013-02-26 Thread Varix
What is the best way to configure virtualhost with map? Varix Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236611,236611#msg-236611 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx