====== Apache mod_wsgi ====== * [[Apache]] * [[django]] * [[http://modwsgi.readthedocs.io/en/develop/|mod_wsgi homepage]] * [[http://modwsgi.readthedocs.io/en/develop/configuration.html|mod_wsgi Apache Directives]] ==== 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 /usr/local/www/wsgi-scripts/python.wsgi Require all granted Hello world script for ''python.wsgi'': def application(environ, start_response): status = '200 OK' output = b'Hello, world!' response_headers = [('Content-type', 'text-plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output]