by mtberatwork · 11y ago · 0 comments
On that note though, getting mod_wsgi up and running with Apache is really quite simple.
def wsgi_app(environ, start_response):
output = 'Hello World!'
status = '200 OK'
headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, headers)
yield output
# mod_wsgi need the *application* variable to serve our small app
application = wsgi_app
Instead of this: <?php
echo 'Hello World!';Adapting your wsgi script for "what? is it in a virtual env? Where? What version of Python is running on this server?" and other similar problems is not so easy.
But yes, it's a matter of an hour or two for a complete newby to complete it. It completely disappears when compared to the time it takes to develop the site, but lots and lots of people consider it the most important aspect of a platform, because it comes first.