win+xampp+wsgi+python环境配置 2013-05-23 @ TECH mod_wsgi.sopythonwindowswsgiwsgi_modulexampp
一、mod_wsgi
https://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2
下载对应版本的 .so
复制到 XAMPP/apache/conf/modules/mod_wsgi.so
二、修改 httpd.conf 配置
LoadModule段最后追加
LoadModule wsgi_module modules/mod_wsgi.so
mime_module段
AddHandler 后追加 .py
三、vhost配置
ServerName test.com ServerAdmin root@test.com DocumentRoot "E:/www/test_python/" <Directory "E:/www/test_python/"> Options +ExecCGI AddHandler cgi-script .py Options -Indexes FollowSymLinks Order allow,deny Allow from all AllowOverride All ErrorLog "E:/www/test_python/error.log"
四、hello world
#!D:/Python27/python print "Content-type: text/html\n\n" __hello__ = """ <html> <head> <title>Hello World from Python</title> </head> <body> Hello World from a Python CGI Script </body> </html> """ print __hello__
下一篇: win7下星际1花屏补丁
上一篇: 时区拾遗
暂无评论