Cliff, you're my hero! =) I modified it slightly and ended up with: location = / { if ($is_args) { proxy_pass http://blog.foobar.com; # wordpress } proxy_pass http://www.foobar.com; # django } It works great and that is all that matters. To address your question with sub-domain or folder -- it's a matter of having a pretty URLs and a seamlessly integrated blog and site. =)by mvip - Nginx Mailing List - English
Cliff, Thanks for taking the time to answer my post. Unfortunately that didn't do the trick. Let me try to explain the situation a bit better. I'm using Nginx as a load balancer to proxy two different apps sitting on the same domain: one Django app and one wordpress blog. I want to proxy '/' and '/folder1' to the django server and /?.* as well as everything else to the wordpress server.by mvip - Nginx Mailing List - English
I think I've tried all different approaches for this, but here is the problem: I need to separate all URLs starting with '/?' from the remaining ones (eg /?p=12). I've tried a bunch of different regex matches, but none of them seems to be able to match URLs starting with a '?'. I already started a thread here (http://forum.nginx.org/read.php?11,8435), but Jim referred me over to the mailing liby mvip - Nginx Mailing List - English
Unfortunately that didn't do the trick either. I tried both with more precise variables as well as this one (along with a few different versions of it): location ^~ \?.* { proxy_pass http://blog.foobar.com;} Could it possibly be a bug in Nginx that prevents it from matching 'locations' when they start with '?'by mvip - How to...
Jim, Thanks for replying on my post. Please find my comments below. Jim Ohlstein Wrote: ------------------------------------------------------- > Are the requests coming in on those separate hosts > - ie blog.foobar.com and foobar.com? > > If so, the easy way is with separate server > blocks. Assuming the backends are local, something > like: > > > serby mvip - How to...
I've tried quite a few different options, but neither of them worked out, but this is what I want to accomplish: All GET strings starting with p= or s= should be sent to a different bac-end server. I tried this: location / { if ($args ~* ^(s=.*|p=.*)) { proxy_pass http://blog.foobar.com; break;} proxy_pass http://www.foobar.com; } Iby mvip - How to...