Install wsgi on centos

Source: Internet
Author: User

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>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.