我正在尝试设置烧瓶mod_wsgi
但我不断收到以下错误
(13)Permission denied: access to / denied (filesystem path '/home/ec2-user/myapp') because search permissions are missing on a component of the path
test 是 Flask 应用程序中的有效路径。
这是我的myapp.conf
文件在/etc/httpd/conf.d
folder
WSGIRestrictStdout Off
<VirtualHost *>
ServerName somewhere.compute-1.amazonaws.com
WSGIDaemonProcess flaskapp user=ec2-user group=ec2-user threads=5
WSGIScriptAlias / /home/ec2-user/myapp/myapp.wsgi
<Directory /home/ec2-user/myapp>
WSGIProcessGroup flaskapp
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
LogLevel notice
</VirtualHost>
This is Apache/2.2.26
with python 2.6.8
我没有使用 virtualenv。
当我启动 apache 时,我在 error_log 中看到了这一点
[Mon Feb 10 14:33:00 2014] [notice] Apache/2.2.26 (Unix) DAV/2 mod_wsgi/3.2 Python/2.6.8 configured -- resuming normal operations
这是我的myapp.wsgi
file
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
application.run(host='0.0.0.0', port=80)
运行只是python myapp.wsgi
工作正常
该错误似乎告诉我应该更改某些文件夹的某些权限,但我不知道哪个文件夹。