【发布时间】:2019-04-16 08:40:10
【问题描述】:
我试图让烧瓶与虚拟环境和 wsgi 配置为工作,但 Apache 一直给我这个错误:
[2018 年 11 月 13 日星期二 13:23:55.179153] [wsgi:error] [pid 11819] [x.x.x.x:xxxx] app.session_interface = self._get_interface(app)
[2018 年 11 月 13 日星期二 13:23:55.179160] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/var/www/html/project/python/lib/python3.6/site-packages /flask_session/init.py", 第 93 行,在 _get_interface 中
[2018 年 11 月 13 日星期二 13:23:55.179163] [wsgi:error] [pid 11819] [x.x.x.x:xxxx] config['SESSION_USE_SIGNER'], config['SESSION_PERMANENT'])
[2018 年 11 月 13 日星期二 13:23:55.179169] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/var/www/html/project/python/lib/python3.6/site-packages /flask_session/sessions.py", 第 314 行,在 init
中[2018 年 11 月 13 日星期二 13:23:55.179172] [wsgi:error] [pid 11819] [x.x.x.x:xxxx] self.cache = FileSystemCache(cache_dir, threshold=threshold, mode=mode)
[2018 年 11 月 13 日星期二 13:23:55.179177] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/var/www/html/project/python/lib/python3.6/site-packages /werkzeug/contrib/cache.py", 第 717 行,在 init
中[2018 年 11 月 13 日星期二 13:23:55.179180] [wsgi:error] [pid 11819] [x.x.x.x:xxxx] os.makedirs(self._path)
[2018 年 11 月 13 日星期二 13:23:55.179185] [wsgi:error] [pid 11819] [xxxx:xxxx] 文件“/lib64/python3.6/os.py”,第 220 行,在 makedirs 中
[2018 年 11 月 13 日星期二 13:23:55.179188] [wsgi:error] [pid 11819] [x.x.x.x:xxxx] mkdir(name, mode)
[2018 年 11 月 13 日星期二 13:23:55.179215] [wsgi:error] [pid 11819] [x.x.x.x:xxxx] PermissionError: [Errno 13] Permission denied: '/flask_session'
我尝试给项目不同的权限,但没有任何效果
【问题讨论】:
标签: python apache flask wsgi flask-session