I have a server on which I have configured Nginx and Unicorn, where Unicorn servers static pages. In my case I'm writing a rewrite rule in Nginx that, if a request comes to mydomain.com it should redirect to another domain, which is possible with following rule.location / {rewrite ^/$ yahoo.com;}Well, the above code is working fine for me, but when I write mydomain.com/docs/web in the address bar, Nginx throws 404 page. Basically, in my case Unicorn handles this request (when above Nginx code does not exist), and I want it so that Unicorn should handle this request when the above code exists in Nginx.
nginx should not handle unicorn's request
ubuntu;webserver;nginx;rewrite