1n5*_*1aC 3 mod-wsgi mod-authz-host apache-2.4
所以我在403: Forbidden
我的 apache2.4 虚拟主机之一上遇到错误。
有趣的是,/var/log/apache2/error.log
报告:
authz_core:error] [pid 4878:tid 140394394269440] [client 10.214.154.19:33009] AH01630: client denied by server configuration
而且....虽然我确实有其他使用 authz 的 Virtualhosts(主要用于 subversion 托管),但我禁用了所有这些,除了我遇到问题的那个,重新启动了 Apache,并且没有明显的区别。
这是我的 Apache2 站点可用文件,尽管我已禁用所有其他主机配置,并将我的配置降至最低,但仍然拒绝访问。
<VirtualHost *:443>
WSGIScriptAlias /example /data/example/example.wsgi
<Directory /data/example>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
Require all granted
</Directory>
LogLevel info
SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.pem
SSLCertificateKeyFile /etc/ssl/private/example.key
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
此外,为了验证这不是我的 wsgi 脚本,我将脚本替换为:
def application(environ, start_response):
start_response('200 OK',[('Content-type','text/html')])
return ['<html><body>Hello World!</body></html>']
Run Code Online (Sandbox Code Playgroud)
而这并没有任何明显的区别。
有任何想法吗?
小智 7
如Apache“客户端被服务器配置拒绝”所示,尽管允许访问目录(虚拟主机配置),但问题是 Apache 2.4 更改了授权配置的完成方式。authz_core 模块实际上是内置的,这似乎是一个混乱的来源。
如果您只是删除 Order 和 Allow 行,事情应该会按预期工作。有关详细信息,请参阅http://httpd.apache.org/docs/2.4/upgrading.html。
归档时间: |
|
查看次数: |
31647 次 |
最近记录: |