Running Python scripts like PHP

That doesn't look as cool as having a wsgi app running, so I recommend that you use the flask framework which is as simple as can be a sane framework.

Here's a link describing the install procedure on mod_wsgi.

Later on, you might want to consider a cool framework like Django, Pyramid, Grok ...

If you really want to use mod_wsgi like mod_php check Graham Dumpleton's great answer.


Technically what you are doing should work, but see AddHandler method for configuring mod_wsgi in:

http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive

That way you don't have to fiddle with Files directive.

SetHandler does similar thing but all files in context are treated as WSGI script files even if they may be static HTML or PHP files. You got away with it because qualified with Files, but better to just use AddHandler.

Do note that code reloading will not work like you are used to with PHP. See:

http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode