Nginx and Django on Dotcloud

Posted by jmetz on Stack Overflow See other posts from Stack Overflow or by jmetz
Published on 2012-10-19T22:34:09Z Indexed on 2012/10/19 23:01 UTC
Read the original article Hit count: 193

Filed under:
|
|

I currently have a dotcloud app that uses django to serve everything. It works great, however, we recently had our site redone in angular.js, and I don't want to use django to serve the actual html pages (I want to just use nginx for that), but I want django to serve some links for the API we built for the angular code to use.

Is it possible for me, in the same app, to configure nginx to serve some static files for particular urls, and have it send other urls for django to serve?

I want nginx to serve my index.html page is a request comes in to wwww.example.com, but if a request for example.com/api/login/ comes in, I want that to be handled by django. Is this possible?

© Stack Overflow or respective owner

Related posts about django

Related posts about nginx