How to serve subdomain from subfolder of the domain root?

2013-09-13 Thread etrader
In a server as server { server_name domain.com *.domain.com root /var/www/$server_name; } is it possible to set locations for subdomains based on subfolders of the $server_name ? location matching sub1.domain.com { serving from /var/www/$server_name/sub1 } Currently, I am using a server for e

request body and client_body_buffer_size

2013-09-13 Thread Jeroen Ooms
Is it correct that when $content_length > client_body_buffer_size, then $request_body == "" ? If so this would be worth documenting at request_body. I am using: proxy_cache_methods POST; proxy_cache_key "$request_method$request_uri$request_body"; Which works for small requests, but for l

Re: query part included in location match after rewrite (bug or feature?)

2013-09-13 Thread aldem
Francis, thank you for your time and looking through the source :) Though I still consider this issue as a "bug" (either in documentation or in consistence), what really matters is that understanding how it works is very helpful, and you did the perfect job explaining this. Hopefully, someone, so

Re: Problem with double slashes in urls with uwsgi and sockets

2013-09-13 Thread mpnally
Thanks for excellent reply, Francis. I have not had time yet to try it, but this looks like it will solve my problem. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,242823,242833#msg-242833 ___ nginx mailing list nginx@nginx.org http://mailma

Re: query part included in location match after rewrite (bug or feature?)

2013-09-13 Thread Francis Daly
On Fri, Sep 13, 2013 at 09:48:05AM -0400, aldem wrote: Hi there, reading through ngx_http_rewrite_module.c and thinking about it some more, I believe I was wrong in my previous mail. I tried to simplify too much. > Well, this is where I am lost a bit - documentation only says "replacement > str

Re: query part included in location match after rewrite (bug or feature?)

2013-09-13 Thread aldem
Well, this is where I am lost a bit - documentation only says "replacement string", and from my understanding this includes possible expansion of variables (like everywhere else), and it doesn't mention (or I couldn't find, at least) that rewrite target is normalized URI (or that variables could be

Re: query part included in location match after rewrite (bug or feature?)

2013-09-13 Thread Francis Daly
On Fri, Sep 13, 2013 at 08:48:55AM -0400, aldem wrote: Hi there, > According to documentation, "location" matches only against URI path, > ignoring query string. However, after "rewrite", when using variables > containing "?" character (like $request_uri for illustration), query becomes > part of

query part included in location match after rewrite (bug or feature?)

2013-09-13 Thread aldem
Hi, According to documentation, "location" matches only against URI path, ignoring query string. However, after "rewrite", when using variables containing "?" character (like $request_uri for illustration), query becomes part of $uri: location /src/ { rewrite ^ /dst$request_uri; } location /