python mod wsgi的问题

python mod wsgi的问题,python,mod-wsgi,Python,Mod Wsgi,我不能运行python scrip 这是因为wsgi的版本吗?如果是,我可以得到所需的wsgi版本 错误: [Sun Jul 09 12:50:24.187917 2017] [wsgi:warn] [pid 20092] mod_wsgi: Compiled for Python/2.7.8. [Sun Jul 09 12:50:24.187945 2017] [wsgi:warn] [pid 20092] mod_wsgi: Runtime using Python/2.7.9. [Sun

我不能运行python scrip

这是因为wsgi的版本吗?如果是,我可以得到所需的wsgi版本

错误:

[Sun Jul 09 12:50:24.187917 2017] [wsgi:warn] [pid 20092] mod_wsgi: Compiled for Python/2.7.8.
[Sun Jul 09 12:50:24.187945 2017] [wsgi:warn] [pid 20092] mod_wsgi: Runtime using Python/2.7.9.
[Sun Jul 09 12:50:24.189601 2017] [mpm_prefork:notice] [pid 20092] AH00163: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Sun Jul 09 12:50:24.189617 2017] [core:notice] [pid 20092] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 09 12:50:29.102086 2017] [wsgi:error] [pid 20098] [client x] mod_wsgi (pid=20098): Target WSGI script '/var/www/get5-web/get5.wsgi' cannot be loaded as Python module.
[Sun Jul 09 12:50:29.102112 2017] [wsgi:error] [pid 20098] [client x] mod_wsgi (pid=20098): Exception occurred processing WSGI script '/var/www/get5-web/get5.wsgi'.
[Sun Jul 09 12:50:29.102125 2017] [wsgi:error] [pid 20098] [client x] Traceback (most recent call last):
[Sun Jul 09 12:50:29.102135 2017] [wsgi:error] [pid 20098] [client x]   File "/var/www/get5-web/get5.wsgi", line 15, in <module>
[Sun Jul 09 12:50:29.102170 2017] [wsgi:error] [pid 20098] [client x]     from get5 import app as application
[Sun Jul 09 12:50:29.102177 2017] [wsgi:error] [pid 20098] [client x]   File "/var/www/get5-web/get5/__init__.py", line 68, in <module>
[Sun Jul 09 12:50:29.102224 2017] [wsgi:error] [pid 20098] [client x]     app.config['LOG_PATH'], when='midnight')
[Sun Jul 09 12:50:29.102231 2017] [wsgi:error] [pid 20098] [client x]   File "/usr/lib/python2.7/logging/handlers.py", line 171, in __init__
[Sun Jul 09 12:50:29.102398 2017] [wsgi:error] [pid 20098] [client x]     BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay)
[Sun Jul 09 12:50:29.102406 2017] [wsgi:error] [pid 20098] [client x]   File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
[Sun Jul 09 12:50:29.102415 2017] [wsgi:error] [pid 20098] [client x]     logging.FileHandler.__init__(self, filename, mode, encoding, delay)
[Sun Jul 09 12:50:29.102419 2017] [wsgi:error] [pid 20098] [client x]   File "/usr/lib/python2.7/logging/__init__.py", line 911, in __init__
[Sun Jul 09 12:50:29.102633 2017] [wsgi:error] [pid 20098] [client x]     StreamHandler.__init__(self, self._open())
[Sun Jul 09 12:50:29.102640 2017] [wsgi:error] [pid 20098] [client x]   File "/usr/lib/python2.7/logging/__init__.py", line 936, in _open
[Sun Jul 09 12:50:29.102648 2017] [wsgi:error] [pid 20098] [client x]     stream = open(self.baseFilename, self.mode)
[Sun Jul 09 12:50:29.102659 2017] [wsgi:error] [pid 20098] [client x] IOError: [Errno 13] Permission denied: '/var/www/get5-web/logs/get5.log'
[Sun Jul 09 12:50:24.187917 2017][wsgi:warn][pid 20092]mod_wsgi:Compiled for Python/2.7.8。
[Sun Jul 09 12:50:24.187945 2017][wsgi:warn][pid 20092]mod_wsgi:Runtime using Python/2.7.9。
[Sun Jul 09 12:50:24.189601 2017][mpm_prefork:notice][pid 20092]AH00163:Apache/2.4.10(Debian)mod_wsgi/4.3.0 Python/2.7.9已配置--恢复正常操作
[Sun Jul 09 12:50:24.189617 2017][core:notice][pid 20092]AH00094:命令行:'/usr/sbin/apache2'
[Sun Jul 09 12:50:29.102086 2017][wsgi:error][pid 20098][client x]mod_wsgi(pid=20098):无法将目标wsgi脚本'/var/www/get5 web/get5.wsgi'作为Python模块加载。
[Sun Jul 09 12:50:29.102112 2017][wsgi:error][pid 20098][client x]mod_wsgi(pid=20098):处理wsgi脚本'/var/www/get5 web/get5.wsgi'时发生异常。
[Sun Jul 09 12:50:29.102125 2017][wsgi:error][pid 20098][client x]回溯(最近一次呼叫):
[Sun Jul 09 12:50:29.102135 2017][wsgi:error][pid 20098][client x]File”/var/www/get5 web/get5.wsgi”,第15行,在
[Sun Jul 09 12:50:29.102170 2017][wsgi:error][pid 20098][client x]来自get5导入应用程序作为应用程序
[Sun Jul 09 12:50:29.102177 2017][wsgi:error][pid 20098][client x]File”/var/www/get5-web/get5/___;u init____;.py”,第68行,在
[Sun Jul 09 12:50:29.102224 2017][wsgi:error][pid 20098][client x]app.config['LOG_PATH',when='midnight')
[Sun Jul 09 12:50:29.102231 2017][wsgi:error][pid 20098][client x]File”/usr/lib/python2.7/logging/handlers.py”,第171行,在__
[Sun Jul 09 12:50:29.102398 2017][wsgi:error][pid 20098][client x]BaseRotatingHandler.\uuuu初始化(self,filename,'a',编码,延迟)
[Sun Jul 09 12:50:29.102406 2017][wsgi:error][pid 20098][client x]File”/usr/lib/python2.7/logging/handlers.py”,第64行,在__
[Sun Jul 09 12:50:29.102415 2017][wsgi:error][pid 20098][client x]logging.FileHandler.\uuuu init\uuuuu(self,filename,mode,encoding,delay)
[Sun Jul 09 12:50:29.102419 2017][wsgi:error][pid 20098][client x]文件/usr/lib/python2.7/logging/_init__.py”,第911行,在_init中__
[Sun Jul 09 12:50:29.102633 2017][wsgi:error][pid 20098][client x]StreamHandler.\uuuuuuu init\uuuuuuuuu(self,self.\u open())
[Sun Jul 09 12:50:29.102640 2017][wsgi:error][pid 20098][client x]文件/usr/lib/python2.7/logging/_init____;.py”,第936行,处于打开状态
[Sun Jul 09 12:50:29.102648 2017][wsgi:error][pid 20098][client x]stream=open(self.baseFilename,self.mode)
[Sun Jul 09 12:50:29.102659 2017][wsgi:error][pid 20098][client x]IOError:[Errno 13]权限被拒绝:'/var/www/get5 web/logs/get5.log'

谢谢。

在打开日志文件时,您得到的
权限被拒绝:'/var/www/get5web/logs/get5.log'
。检查Apache是否具有对
/var/www/get5 web/logs/
的写入权限,并确保目录存在。Apache的访问权限和此问题的详细信息记录在中。通常最好将日志发送到stdout/stderr,并使用Apache日志机制和文件旋转。