简体   繁体   中英

correct configuration for apache and mod_python

hi all, how you must configure Apache 2.2 or mod_python?, to avoid the following error:

MOD_PYTHON ERROR
ProcessId: 5399
Interpreter: '127.0.1.1'
ServerName: '127.0.1.1'
DocumentRoot: '/var/www'
URI: '/cgi-bin/wps/'
Location: None
Directory: '/usr/lib/cgi-bin/'
Filename: '/usr/lib/cgi-bin/wps/'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'pywps'
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1206, in _process_target
object = apache.resolve_object(module, object_str, arg, silent=silent) File "/usr/lib/python2.6/dist-packages/mod_python/apache.py", line 696, in resolve_object raise AttributeError, s
AttributeError: module '/usr/local/lib/python2.6/dist-packages/pywps/ init .pyc' contains no 'handler'

this is for a configuration (ubuntu (10.4)) for AMD64. thanks for your answers

In my case, changing

PythonHandler pywps

to

PythonHandler wps

in the .htaccess (or the apache configuration file) fixed the problem.

I think that the file pywps.py has been renamed to wps.py , and this gives problems, since the sample configuration file has been left with the old name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM