- django version:1.6
- os version: Centos 6.2
- nginx version: 1.4.2
- uwsgi version: 2.0.8
- python version: 2.7.5
- django project is in /home/erya/hawk and settings.py is at /home/erya/hawk/settings.py
- nginx conf is at /usr/local/nginx/conf
- This is not a exhaustive reference, I assume all the softwares were installed correct.
- I record some key point when deploy the project.
- the web client <-> the web server <-> the socket <-> uwsgi <-> Django->->->->
use django dev server: python manage.py runserver 8000 OK!
use uwsgi setup django: uwsgi –http :8000 –module wsgi OK!
it seems ok, the important parts coming!
create uwsgi.ini file in django project directorythe file’s content is :
check uwsgi_params file in nginx conf or you can donwload it from github https://github.com/nginx/nginx/blob/master/conf/uwsgi_params
and put it in nginx conf directory.
add uwsgi.conf file,the content is :
add one line to nginx.conf ,like
uwsgi: in project directory
uwsgi --ini uwsgi.ini
The you can open your favorite browser, type
http://127.0.0.1:8000 , you will see your project’s index page.
Of course, what i do is very simple, you can config custom configure of your project.