且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

mod_wsgi的:导入错误:没有模块名为“编码”

更新时间:2022-02-03 21:31:08

因此​​,与一些帮助,我的朋友(IE:系统管理员),我们得到这个想通了昨晚。我***的学习的例子,让我们假设你正在使用的mod_wsgi与用户flipperpa的Linux组阿帕奇运行Apache。让我们假设你主持在/ home /在MY_PROJECT / wsgi.py wsgi.py MY_PROJECT。

So with some help with my friends (IE: SysAdmins), we got this figured out last night. I learn best by example, so let's assume you're running Apache with mod_wsgi as Linux group apache with user flipperpa. Let's assume you're hosting in /home/my_project with wsgi.py in my_project/wsgi.py.

在顶层(ls -l命令/):

At the top level (ls -l /):

drwxr-xr-x.  47 root root  4096 Jul  9 09:43 home

在主目录(ls -l命令/家):

In the home directory (ls -l /home):

drwxrwsr-x   7 flipper        apache 4096 Jul 29 10:22 my_project

这是关键。小写的s是指Apache组的setgid比特位被设置,并且执行位。最后的X,当然,意味着任何人都可以执行

This was the key. The lower case "s" means the apache group's setgid bit is set, and the execute bit is set. The final "x", of course, means anyone can execute.

检查您的权限下的树;这样做有我们。

Check your permissions down the tree; this did the trick for us.