I want to link my Python project to a wsgi
file. I am using mod_wsgi
.
I would like my Python project to be located in /var/www/myProject/start.py
.
I've configured Apache as follows:
<VirtualHost *:80>
ServerName www.example.me
ServerAlias example.me
ServerAdmin example@gmail.com
DocumentRoot /usr/local/www/documents
LogLevel warn
Alias /robots.txt /usr/local/www/documents/robots.txt
Alias /favicon.png /usr/local/www/documents/favicon.png
Alias /media/ /usr/local/www/documents/media/
<Directory /usr/local/www/documents>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /usr/local/www/wsgi-scripts/myApp.wsgi
<Directory /usr/local/www/wsgi-scripts>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
So far this is what I have in myApp.wsgi
file:
import web
urls = (
'/.*', 'hello',
)
class hello:
def GET(self):
return "Hello, world"
application = web.application(urls, globals()).wsgifunc()
What do I have to do in order to link my project which is located in /var/www/myProject/start.py
to be called by myApp.wsgi
?