擅长:python、mysql、java
<p>试试看</p>
<pre><code>LoadModule wsgi_module modules/mod_wsgi.so
DirectoryIndex index.py default.py wsgi.py
WSGIPythonPath "{$path}\python\Lib;{$path}\python\Lib\site-packages;{$path}\python\DLLs"
WSGIPythonHome "{$path}\python"
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
<Directory /path/to/mysite.com/mysite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</code></pre>
<p>让<code>{$path}</code>成为安装/定位Python文件夹的目录。注意<a href="https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonPath" rel="nofollow">WSGIPythonPath</a>和<a href="https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonHome" rel="nofollow">WSGIPythonHome</a>中的变化。</p>
<p>您可以从以下位置搜索预编译的二进制文件:
<a href="https://github.com/GrahamDumpleton/mod_wsgi/tree/master/win32#using-the-pre-compiled-binaries" rel="nofollow">https://github.com/GrahamDumpleton/mod_wsgi/tree/master/win32#using-the-pre-compiled-binaries</a></p>
<p>同时,mowd_ssgi的<a href="https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide" rel="nofollow">Quick Configuration Guide</a>也很有帮助。</p>