mysql-server & python-mysqldb is required to run Django with MySql
nginx is a reverse proxy server that used to redirect the HTTP Request from port 80(default port) to port 8000(Django default port, you can change to any port number)
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.29-0ubuntu0.12.04.2 (Ubuntu)
Copyright (c) 2000, 2012, Oracle and/or its affilliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affilliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
$ mysql -u root -p django_db Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.29-0ubuntu0.12.04.2 (Ubuntu)
Copyright (c) 2000, 2012, Oracle and/or its affilliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affilliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
root@localhost [(django_db)]> desc newapp_user; +--------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | first_name | varchar(30) | NO || NULL || | last_name | varchar(30) | NO || NULL || | created_date | datetime | NO || NULL || +--------------+-------------+------+-----+---------+----------------+ 4 rows in set (0.00 sec)
root@localhost [(none)]> exit
Now configure Nginx to the django project
1
$ sudo vi /etc/nginx/sites-available/django.conf # create a new file