Differences
This shows you the differences between two versions of the page.
— | apache_mod_wsgi [2017/06/28 16:19] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Apache mod_wsgi ====== | ||
+ | * [[Apache]] | ||
+ | * [[django]] | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ==== Ubuntu ==== | ||
+ | |||
+ | In Ubuntu, install the module: | ||
+ | |||
+ | < | ||
+ | aptitude -y install libapache2-mod-wsgi | ||
+ | </ | ||
+ | |||
+ | ==== Apache 2.4 ==== | ||
+ | |||
+ | Add an alias for the Python interpreter and set permissions: | ||
+ | |||
+ | < | ||
+ | WSGIScriptAlias /python / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | Require all granted | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Hello world script for '' | ||
+ | |||
+ | < | ||
+ | def application(environ, | ||
+ | status = '200 OK' | ||
+ | output = b' | ||
+ | response_headers = [(' | ||
+ | start_response(status, | ||
+ | |||
+ | return [output] | ||
+ | </ |