Install mod_wsgi in Debian6Apache2

Source: Internet
Author: User
DebianApache2 install mod_wsgi: download the source file. /configure -- with-apxs/usr/local/apache/bin/apxs -- with-python/usr/bin/python [if. /configure prompt apxs: commandnotfound, to install the apache dev package ap. debian Apache2 install mod_wsgi: download the source file. /configure -- with-apxs =/usr/local/apache/bin/apxs -- with-python =/usr/bin/python [if. /configure prompt apxs: command not found, to install apache dev package apt-get install apache2-threaded-dev] makemake install in/etc/apache2/mod Create the file mod_wsgi.load under s-available, add the LoadModule wsgi_module modules/mod_wsgi.so to save the file, and then add a2enmod mod_wsgi to/etc/apache2/mod-enable. [do not know why a2enmods: command not found later found that/usr/sbin is not in path, strange...] In/etc/apache2/apache. add: WSGIScriptAlias/test/path/test. in wsgi, path is test. wsgi path name test. wsgi content: def application (environ, start_response): status = '2017 OK 'output = 'Hello World! 'Response_headers = [('content-type', 'text/plain '), ('content-length', str (len (output)] start_response (status, response_headers) return [output] restart apache2, sudo/etc/init. d/apache2 restart, and then access http://localhost/test "Hello World !" The installation of mod_wsgi is complete and normal. Next, let's take a look at how to add the django project to the author zhanyingle_1981 under Apache2.

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.