即使在将访问控制更改为适合Apache 2.4配置的访问控制并添加用户/组之后,我仍在wsgi脚本上收到“ AH01630:客户端被服务器配置拒绝”错误,并且也已授予文件所需的权限)到WSGIDeomon流程。
我不确定我还能采取什么措施来解决同样的问题。将访问控制更改为“要求所有被授予”(根据Apache 2.4)后,文档根目录中的相同错误已解决,但wsgi脚本仍然存在。
配置:
Apache/2.4.33 (Amazon) mod_wsgi/3.5 Python/2.7.14
我的httpd_conf文件:
<VirtualHost *:80>
ServerName <DNSname of amazon ec2 service>
DocumentRoot /usr/local/www/documents
<Directory /usr/local/www/documents>
Require all granted
</Directory>
WSGIDaemonProcess myapp user=ec2-user group=ec2-user threads=5 python-path=/usr/local/www/wsgi-scripts/myapp/virt/lib64/python2.7
WSGIScriptAlias /myapp /usr/local/www/wsg-scripts/myapp/myapp.wsgi
<Directory /usr/local/www/wsgi-scripts/myapp>
WSGIProcessGroup myapp
WSGIApplicationGroup %{GLOBAL}
AllowOverride None
Require method GET POST OPTIONS
Require all granted
</Directory>
</VirtualHost>
myapp.wsgi:
import sys
sys.path.insert(0, '/usr/local/www/wsg-scripts/myapp/virt/lib64/python2.7/')
activate_this = '/usr/local/www/wsg-scripts/myapp/virt/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
from myapp import app as application
错误日志:
[authz_core:error] [pid 10063] [client 148.64.7.56:52323] AH01630: client denied by server configuration: /usr/local/www/wsg-scripts/myapp/myapp.wsgi
网页:
Forbidden
You don't have permission to access /myapp on this server.
您能帮我解决这个问题吗?