1. Install Pip
Digitalocean django nginx ubuntu 18
sudo apt-get install Python-pip
2. Install Django and create the project
Pip Install django==1.9.2
django-admin.py Startproject MySite
CD MySite
3, Installation Python2.7-dev
sudo apt-get install Python2.7-dev
Django ubuntu nginx
4, Installation Uwsig
sudo python2.7-m pip install Uwsgi
5. Then go to the directory to find the created project
Create test.py
# test.py
DEF application (env, Start_response):
Start_response (' K OK ', [(' Content-type ', ' text/html ')])
return [B "Hello World"] # Python3
#return ["Hello World"] # Python2
6. Then enter the project directory
Uwsgi--http:8000--wsgi-file test.py
502 bad gateway nginx 1.10 3 ubuntu django
7. Open the browser and enter the URL
127.0.0.1:8000
8. Installing MongoDB
Pip Install pym>
9. Other
xlrd==0.9.4
10. Start the project
Python manage.py runserver 127.0.0.1:8000
Uwsgi--http:8000--module Mysite.wsgi
The above describes the UBUNTU+DJANGO+NGINX+UWSGI, including the django,ubuntu aspects of the content, I hope that the PHP tutorial interested in a friend helpful.