1, install Python and Apache.
2, install Mod_wsgi after get wsgi.so, and put wsgi.so in Apache modules folder.
3, install Webpy.
4. Open httpd.conf (under Apache's Conf folder)
At the end of the document, add:
LoadModule wsgi_module/modules/mod_wsgi.so
Wsgiscriptalias/webapp "d:/develop/webapp/index.py/" alias/webapp/static "d:/develop/webapp/static/" AddType text/ HTML. PY <directory "d:/develop/webapp/" > allowoverride all Options Indexes followsymlinks execcgi Order Allow,deny SetHandler wsgi-script allow from all</directory>
Visit Localhost/webapp to access d:/develop/webapp/index.py
index.py:
Import Web urls = ( '/(. *) ', ' hello ') app = Web.application (URLs, Globals ()) class Hello: def GET (self, name): if not name: name = ' World ' return ' Hello, ' + name + '! ' if __name__ = = "__main__": App.run ()
If you do not have access, you can try to open the firewall:
Control Panel-"system security-" allows programs to run another program through Windows Firewall-"
Add Apache Bin folder Httpd.exe and put the two hooks on the back.
Use of apache+mod in Windows environments