Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
apache_mod_wsgi [2017/06/28 10:16]
steve
apache_mod_wsgi [2017/06/28 10:16]
steve [Apache 2.4]
Line 25: Line 25:
     Require all granted     Require all granted
 </​Directory>​ </​Directory>​
 +</​code>​
 +
 +Hello world script for ''​python.wsgi'':​
 +
 +<​code>​
 +def application(environ,​ start_response):​
 + status = '200 OK'
 + output = b'o hai'
 + response_headers = [('​Content-type',​ '​text-plain'​),​ ('​Content-Length',​ str(len(output)))]
 + start_response(status,​ response_headers)
 +
 + return [output]
 </​code>​ </​code>​