MOD_WSGI is an Apache module which can host any Python WSGI application, including Django.
Follow the below steps to deploy Django with Apache and mod_wsgi to get Django into Production
Steps.
1. Update PACKAGES
$ sudo bash
$ yum update
$ sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y
$ yum reinstall glibc-common
2. Install HTTPD
$ yum install httpd
$ sudo yum install httpd-devel
3. Install MYSQL
$ yum install mysql
$ sudo yum install MySQL-python
4. Install PYTHON
$ sudo yum install python27-devel -y
$ rm /usr/bin/python
$ ln -s /usr/bin/python2.7 /usr/bin/python
$ wget –no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
$ tar xf distribute-0.6.35.tar.gz
$ cd distribute-0.6.35
$ python2.7 setup.py install
5. Install PIP
$ easy_install-2.7 pip
6. Install DJANGO
$ pip install django
To check if Django is installed successfully create a project ‘test1’ using the command:
$ django-admin startproject test1
7. Install MOD_WSGI
$ wget http://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
If you are unable to download the package from above link, google for the link to download mod_wsgi package and untar it using the command:
$ tar xzf mod_wsgi-3.4.tar.gz
$ cd mod_wsgi-3.4
$ ./configure
$ make
$ sudo make install
Hooray…you are ready to host your project.
For any queries please comment below.