Apache2 mod_wsgi 403 forbidden error

此生再无相见时 提交于 2019-12-01 17:36:16
Sventimir

I solved it finally. pxl was half-right, because not only Allow from all should be replaced by Require all granted, but also Order allow,deny is no longer necessary. It turns out to be the reason for my error. Complete script alias config should be like this:

WSGIScriptAlias /huh /mnt/doc/Python/www/index.py                 
<Directory /mnt/doc/Python/www>                                   
    Require all granted
</Directory>

And it works.

Replace Allow from all with Require all granted.

Reference for Apache module mod_authz_core

I wrote like below,

    WSGIScriptAlias /hello /home/myself/projects/hello/hello.wsgi
    <Directory /home/myself/projects/hello>
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>

and it works

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!