Apache2 mod_wsgi 403 forbidden error

前端 未结 3 1069
难免孤独
难免孤独 2021-01-18 05:09

I had it configured right, but then I decided to reinstall my Debian (switching from wheezy to jessie version by the way). Here\'s the problem:

I have a python mod_w

相关标签:
3条回答
  • 2021-01-18 05:46

    Replace Allow from all with Require all granted.

    Reference for Apache module mod_authz_core

    0 讨论(0)
  • 2021-01-18 05:57

    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.

    0 讨论(0)
  • 2021-01-18 06:09

    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

    0 讨论(0)
提交回复
热议问题