|
昨天晚上配置这三个东西费了点时间.结果睡觉之前还没搞定.早上到公司翻了一下apache文档终于搞定了..
在些记录一下:
软件准备:
python2.5.2
apache_2.2.10
django1.0
mod_python-3.3.1win32-py2.5-apache2.2
安装步骤:在些省略........
配置 apache httpd.conf 网上资料超多.找一下.
以下只是自己配置时与到的问题.
1.
(Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
[Fri Oct 31 11:32:30 2008] [error] [client 127.0.0.1] ImportError: Could not import settings 'djproject.settings' (Is it on sys.path? Does it have syntax errors?): No module named djproject.settings_apache
这个说明找不到 'settings.py' 解决办法如:
<Directory "D:/djproject">
SetHandler python-program
PythonPath "sys.path+['D:/']"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE djproject.settings_apache
PythonInterpreter djproject
PythonAutoReload Off
PythonDebug On
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
pythonpath "sys.path + ['d:/']" 我的项目是 d:/djproject. 这个pythonpath 路径一定要是项目 的上级目录.
在如果出现403码时加上
AllowOverride None
Options None
Order allow,deny
Allow from all
此外还有一些问题.还没搞明白
[Fri Oct 31 11:30:36 2008] [error] python_init: Python version mismatch, expected '2.5', found '2.5.2'.
[Fri Oct 31 11:30:36 2008] [error] python_init: Python executable found 'C:\\Apache2.2\\bin\\httpd.exe'.
[Fri Oct 31 11:30:36 2008] [error] python_init: Python path being used 'C:\\WINDOWS\\system32\\python25.zip;C:\\Python25\\Lib;C:\\Python25\\DLLs;C:\\Python25\\Lib\\lib-tk;;C:\\Apache2.2\\bin'.
为什么版本不批配.请教达人指点.. |
|