Step 1: Compile and install wsgi
1. wget https://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
2. Tar zxvf mod_wsgi-3.4.tar.gz
3../configure -- With-apxs =/usr/sbin/apxs
4. Make
5. Make install
6. Make clean
7. Make distclean
Step 2: Set the subgrade
Wsgi settings
Import sys
# SYS. Path. append ('/var/www/html/gdnsplus_conf /')
Path = '/usr/local/gdnsplus_conf/WWW'
If path not in SYS. Path:
SYS. Path. append (PATH)
Import OS
OS. Environ. setdefault ("django_settings_module", "mysite. Settings ")
Step 3: HTTP settings
Httpd settings
Errorlog/usr/local/gdnsplus_conf/var/log/httpd_err.log
Customlog/usr/local/gdnsplus_conf/var/log/httpd_cust.log combined
Loadmodule wsgi_module modules/mod_wsgi.so
Wsgiscriptalias // var/www/html/gdnsplus_conf/wsgi. py
# Wsgipythonpath/var/www/html/gdnsplus_conf
<Directory/var/www/html/gdnsplus_conf>
# <Files wsgi. py>
Order deny, allow
Allow from all
# </Files>
</Directory>