Sunday, September 01, 2013

Django FastCgi with Nginx

When Launching a  django app, Configuring an nginx virtual host is the most tedious thing. I never can write a configuration with out fiddling with it for a day.

So I descided to write a script for it to auto manage it,

Clone my git hub repo https://github.com/abhisheklalnediya/djangonginx

copy the StartServer.sh to the app directory
specify the port for nginx as the first argument
eg :
$ StartServer.sh 8011

What it does is:
1. Start django in fasctcgi
2. Generate an nginx virtual host configuration file
3. Reloads nginx
4. Happy :) ?

No comments:

Post a Comment