2006年01月26日 星期四 20:20
apache如下设置:ServerAdmin hoxde_dirac at yahoo.com.cn DocumentRoot "d:/yey_web/yey_python" ServerName www.mdxx.com ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common AddDefaultCharset gb2312 Alias /weblogcom/css "d:/pyblog/flavours/css" Alias /weblogcom/images "d:/pyblog/images" Alias /weblog /weblog Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all SetHandler mod_python PythonHandler mod_python.publisher PythonAutoReload On PythonDebug On PythonPath "['d:/yey_web/yey_python/bin']+sys.path" AllowOverride None Order allow,deny Allow from all DefaultType text/html AddDefaultCharset utf-8 PythonDebug on SetHandler python-program # set PythonPath to the folders containing the files. PythonPath "['d:/pyblog/myblog']+sys.path" PythonHandler mp_wsgi_handler::wsgi_handler # This should be the same as the Location above PythonOption ApplicationPath /weblog PythonOption application wsgi_app::application Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all 想在一个虚拟主机中使用两个mod_python应用, 一个是baybwork自己写的, 用mod_python.publisher Handler, 另一个是pyblosxom, 用wsgi handler. 发现的现象是两个应用不能共存, 错误为报属性不存在, 如 Mod_python error: "PythonHandler mp_wsgi_handler::wsgi_handler" Traceback (most recent call last): File "D:\Python23\Lib\site-packages\mod_python\apache.py", line 299, in HandlerDispatch result = object(req) File "d:/pyblog/myblog\mp_wsgi_handler.py", line 192, in wsgi_handler app = apache.resolve_object(module, objname, arg=None, silent=False) File "D:\Python23\Lib\site-packages\mod_python\apache.py", line 528, in resolve_object raise AttributeError, s AttributeError: module 'd:/pyblog/myblog\wsgi_app.pyc' contains no 'application' 但事实是application是存在的. 两种应用交替出现此类错误, 哪个应用能用完全取决于最先运行了哪个应用~~ 确实令人郁闷的问题, 不知道有谁给些建议? -- ========================================================== A student of Math in Soochow University in China. Intrested in Math, Python, Octave, Lisp, Maxima, Prolog and .NET/MONO. Blog: http://blog.sina.com.cn/blog/1142604745 Wiki: http://wiki.woodpecker.org.cn/moin/Hoxide
2006年01月26日 星期四 21:45
http://www.dscpl.com.au/articles/modpython-003.html#configuration-of-logging 这个也许能说明点问题 在 06-1-26,hoxide Ma<hoxide at gmail.com> 写道: > apache如下设置: > >> ServerAdmin hoxde_dirac at yahoo.com.cn > DocumentRoot "d:/yey_web/yey_python" > ServerName www.mdxx.com > ErrorLog logs/dummy-host.example.com-error_log > CustomLog logs/dummy-host.example.com-access_log common > AddDefaultCharset gb2312 > Alias /weblogcom/css "d:/pyblog/flavours/css" > Alias /weblogcom/images "d:/pyblog/images" > Alias /weblog /weblog > > > > Options Indexes FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > > > > SetHandler mod_python > PythonHandler mod_python.publisher > PythonAutoReload On > PythonDebug On > PythonPath "['d:/yey_web/yey_python/bin']+sys.path" > AllowOverride None > Order allow,deny > Allow from all > DefaultType text/html > > > > > AddDefaultCharset utf-8 > PythonDebug on > SetHandler python-program > # set PythonPath to the folders containing the files. > PythonPath "['d:/pyblog/myblog']+sys.path" > PythonHandler mp_wsgi_handler::wsgi_handler > # This should be the same as the Location above > PythonOption ApplicationPath /weblog > PythonOption application wsgi_app::application > > > > Options Indexes FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > > > > Options Indexes FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > > > 想在一个虚拟主机中使用两个mod_python应用, 一个是baybwork自己写的, 用mod_python.publisher > Handler, 另一个是pyblosxom, 用wsgi handler. 发现的现象是两个应用不能共存, 错误为报属性不存在, 如 > > Mod_python error: "PythonHandler mp_wsgi_handler::wsgi_handler" > > Traceback (most recent call last): > > File "D:\Python23\Lib\site-packages\mod_python\apache.py", line 299, > in HandlerDispatch > result = object(req) > > File "d:/pyblog/myblog\mp_wsgi_handler.py", line 192, in wsgi_handler > app = apache.resolve_object(module, objname, arg=None, silent=False) > > File "D:\Python23\Lib\site-packages\mod_python\apache.py", line 528, > in resolve_object > raise AttributeError, s > > AttributeError: module 'd:/pyblog/myblog\wsgi_app.pyc' contains no 'application' > > 但事实是application是存在的. > > 两种应用交替出现此类错误, 哪个应用能用完全取决于最先运行了哪个应用~~ > > 确实令人郁闷的问题, 不知道有谁给些建议? > > -- > ========================================================== > > A student of Math in Soochow University in China. > Intrested in Math, Python, Octave, Lisp, Maxima, Prolog and .NET/MONO. > > Blog: http://blog.sina.com.cn/blog/1142604745 > Wiki: http://wiki.woodpecker.org.cn/moin/Hoxide > -- ========================================================== A student of Math in Soochow University in China. Intrested in Math, Python, Octave, Lisp, Maxima, Prolog and .NET/MONO. Blog: http://blog.sina.com.cn/blog/1142604745 Wiki: http://wiki.woodpecker.org.cn/moin/Hoxide
Zeuux © 2025
京ICP备05028076号