windows下python+wsgi配置!(求大神看下哪里错了)
LoadModule mod_wsgi_module module/mod_wsgi.so
<Directory "E:/site">
Options ExecCGI
AddHandler wsgi-script .py
Order allow,deny
Allow from all
</Directory>
这是我的配置信息,重启apache一直错误,反复搞不定,还有啥地方不对?是不要将py安装目录加path?还是哪里,或者机器不能安装俩个版本的py?(我安装了2.6和3.3)就这样的配置怎么启动py解释器呢!求大神给我看下
[解决办法]
这是我的,按照wsgimode官网上说的。
#hw
#support python swgi
LoadModule wsgi_module modules/mod_wsgi.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited
#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off
# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf
# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf
# Language settings
#Include conf/extra/httpd-languages.conf
# User home directories
#Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf
# Various default settings
#Include conf/extra/httpd-default.conf
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
WSGIScriptAlias /earthquake_china c:/apache/htdocs/webservice/earquake_service.py/
WSGIScriptAlias /upload c:/apache/htdocs/webservice/uploadfile.py/
AddType text/html .py
[解决办法]
看最后三行。。。