不确定是什么问题。通过 ssh 工作正常。在浏览器中查看时,出现服务器错误。这是已迁移到另一个服务器/环境的已知工作代码。
它找不到明确在目录中的模块。已检查文件的权限,它们看起来不错 755。
内部服务器错误
服务器遇到内部错误或配置错误,无法完成您的请求。请联系服务器管理员,告知错误发生的时间以及您可能所做的任何可能导致错误的事情。
服务器错误日志中可能提供有关此错误的更多信息。
ImportError: No module named xmlproducts
mod_python (pid=16232, interpreter='realtechy.com', phase='PythonHandler', handler='mod_python.cgihandler'): Application error
ServerName: 'realtechy.com'
DocumentRoot: '/var/www/vhosts/realtechy.com/httpdocs'
URI: '/products/myproducts.py'
Location: None
Directory: '/var/www/vhosts/realtechy.com/httpdocs/'
Filename: '/var/www/vhosts/realtechy.com/httpdocs/products/myproducts.py'
PathInfo: ''
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg)
File "/usr/lib/python2.6/site-packages/mod_python/cgihandler.py", line 96, in handler\n imp.load_module(module_name, fd, path, desc)
File "/var/www/vhosts/realtechy.com/httpdocs/products/myproducts.py", line 6, in <module>\n import xmlproducts
ImportError: No module named xmlproducts