Re: Multiple site configuration

2013-05-13 Thread Francis Daly
On Mon, May 13, 2013 at 12:26:32PM -0400, guillaumeserton wrote: Hi there, > I would like to set nginx to use several website, and that they are > reachable for some of them with a domain name or in localhost. Based on the connected ip:port and the provided Host: header, nginx will choose one se

Re: async notification in Nginx

2013-05-13 Thread Alder Network
By browsing the source code, it seems ngx_event_t can be used for this purpose, but looks like ngx_event_t has to be associated with ngx_connection_t, does ngx_connection_t have to be a socket, or a regular file descriptor will do? Is there any forum for wrting nginx modules? On Fri, May 10, 201

[ANN] ngx_openresty stable version 1.2.7.8 and devel version 1.2.8.3

2013-05-13 Thread agentzh
Hello! I've just released ngx_openresty stable version 1.2.7.8 and devel version 1.2.8.3 which both just contain the official patch for the nginx security advisory CVE-2013-2070: http://openresty.org/#Download Best regards, -agentzh ___ nginx mail

Re: Multiple site configuration

2013-05-13 Thread B.R.
The problem I see is you try to address the process of requests differently whether from inside your network or from the outside. You may already solve the problem of your outside interface easily with server names (knowing how nginx processes a req

Re: [nginx-announce] nginx-1.2.9

2013-05-13 Thread Kevin Worthington
Hello Nginx users, Now available: Nginx 1.X.X for Windows http://goo.gl/rNjpl (32-bit and 64-bit versions) These versions are to support legacy users who are already using Cygwin based builds of Nginx. Officially supported native Windows binaries are at nginx.org. Announcements are also availabl

Multiple site configuration

2013-05-13 Thread guillaumeserton
Hello, I would like to set nginx to use several website, and that they are reachable for some of them with a domain name or in localhost. Example: Site1: only accessible on localhost with 192.168.x.x/site1 (root: /var/www/site1) Site2: accessible accessible on site2.eu domain and also on localho

Re: Dynamic upstream configuration

2013-05-13 Thread mamoos1
Hi! Unfortunately, I didn't find a very good solution for this, but, in nginx 1.4+ the issue with SSL backend keepalive was fixed - so if you have a list of all your possible servers, your configuration file will look horrible, but you can achieve this by having all the backend servers defined as

Re: Dynamic upstream configuration

2013-05-13 Thread krukow
mamoos1 Wrote: --- [snip...] > I know that I can configure keep-alive with upstream - but that > requires me to know upfront which servers will be used (which I don't, > since I dynamically fetch content according to headers). > Is there a way to

Re: [1.4.1] Finding docroot directory?

2013-05-13 Thread Shohreh
Thanks everyone for the infos. "nginx -V" doesn't say where the docroot is, but I noticed that /etc/nginx/nginx.conf does use "/etc/nginx/conf.d/*.conf", where default.conf says: [code] location / { root /usr/share/nginx/html [/code] Thank you. Posted at Nginx Forum: http://forum.ngin

nginx security advisory (CVE-2013-2070)

2013-05-13 Thread Maxim Dounin
Hello! A security problem related to CVE-2013-2028 was identified, affecting some previous nginx versions if proxy_pass to untrusted upstream HTTP servers is used. The problem may lead to a denial of service or a disclosure of a worker process memory on a specially crafted response from an upstr

nginx-1.2.9

2013-05-13 Thread Maxim Dounin
Changes with nginx 1.2.9 13 May 2013 *) Security: contents of worker process memory might be sent to a client if HTTP backend returned specially crafted response (CVE-2013-2070); the bug had appeared in 1.1.4. -- Maxim Dounin http://ngin

Re: [1.4.1] Finding docroot directory?

2013-05-13 Thread Francis Daly
On Mon, May 13, 2013 at 07:02:14AM -0400, Shohreh wrote: Hi there, > I'm confused about the multiple configuration files used by Nginx: > > /etc/nginx.conf > /etc/conf.d/ > /etc/sites-available/ > /etc/sites-enabled/ > > Why are there more than one? nginx uses exactly one -- the one named in t

Re: [1.4.1] Finding docroot directory?

2013-05-13 Thread Francis Daly
On Mon, May 13, 2013 at 06:56:11AM -0400, Shohreh wrote: Hi there, > I'm running Nginx 1.4.1 on an appliance running Debian 6, and can't find > from which directory Nginx is serving files. If "nginx -V" doesn't tell you, and the log files don't tell you, then you can do something like locatio

Re: location matching.

2013-05-13 Thread Francis Daly
On Sun, May 12, 2013 at 03:25:56PM +0100, Steve Wilson wrote: Hi there, I see from the end of the thread that you have a working system now by using separate server{} blocks, so that's all good. It might be interesting to see why the original did not do what you wanted, and to see whether there

Re: [1.4.1] Finding docroot directory?

2013-05-13 Thread Paul N. Pace
This Ars Technica article is where I learned how to use nginx. Lee Hutchinson does a good job explaining all that. http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ On Mon, May 13, 2013 at 4:02 AM, Shohreh wrote: > I found a work-around: Reading "/var/log/nginx/e

Re: [1.4.1] Finding docroot directory?

2013-05-13 Thread Shohreh
I found a work-around: Reading "/var/log/nginx/error.log" includes a warning that Nginx can't find "/usr/share/nginx/html/favicon.ico", so for some reason, Nginx uses /usr/share/nginx/html/ instead of /var/www. I'm confused about the multiple configuration files used by Nginx: /etc/nginx.conf /et

[1.4.1] Finding docroot directory?

2013-05-13 Thread Shohreh
Hello I'm running Nginx 1.4.1 on an appliance running Debian 6, and can't find from which directory Nginx is serving files. According to /etc/nginx.conf, the location for "/" is "root /var/www;", but even renaming the default index.html still displays the familiar "Welcome to nginx!". After us

Re: Reading request_body before passing to backend server

2013-05-13 Thread Maxim Dounin
Hello! On Sat, May 11, 2013 at 09:53:47PM -0400, dktp1 wrote: > I am trying to read if a specific value is set (passed) as a POST using > request_body. > > What I am trying to do is: > > server { > .. > if ($request_body ~ "API-value-Iwanttocheck") { > set $my_api "TRUE"; > } > > And