【问题标题】:"Access forbidden!" apache + wsgi + xampp“禁止访问!” apache + wsgi + xampp
【发布时间】:2017-02-20 22:17:55
【问题描述】:

我在这里用头撞砖墙。我有一个通过 xampp 的 Apache 2.4 服务器,我正在尝试使用 wsgi 应用程序进行设置。我按照https://modwsgi.readthedocs.io/en/develop/user-guides/quick-configuration-guide.html 的说明进行了很多搜索,但似乎没有任何效果,而且我总是收到此错误

Access forbidden!

    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

    If you think this is a server error, please contact the webmaster.

Error 403

    10.226.65.62
    Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_wsgi/4.4.12 Python/2.7.12 PHP/5.6.24

我已将窗口文件夹权限设置为“所有人”并尝试了各种组合

<Directory "C:/wsgi-scripts">
   AllowOverride none
    Require all denied
</Directory>

但似乎没有任何效果。有人对此有任何想法吗?我的 httpd.conf 可以在这里找到http://pastebin.com/uLtdXqrv

谢谢

【问题讨论】:

    标签: apache xampp mod-wsgi


    【解决方案1】:

    您告诉 Apache 禁止访问。你有:

    <Directory "C:/wsgi-scripts">
       AllowOverride none
        Require all denied
    </Directory>
    

    应该是:

    <Directory "C:/wsgi-scripts">
       AllowOverride none
        Require all granted
    </Directory>
    

    查看 Apache 文档以了解 deniedgranted 之间的区别。

    【讨论】:

    • 谢谢格雷厄姆,我改变了它并重新启动了 apache,但行为没有改变......有什么想法吗?
    • 尝试注释掉Include conf/extra/httpd-vhosts.conf这一行。该文件中的VirtualHost 可能会覆盖它。或者在默认的VirtualHost 中添加 mod_wsgi 配置。
    • 再次感谢@graham。我注释掉了那行,但仍然是相同的消息。
    • 不确定这是否与问题有关,但在阅读了(您的??)cmets on Running mod_wsgi on windows 我用 'apache haus' 中的 VC9 Apache 替换了默认的 VC11 Xampp Apache 2.4 并复制了*.conf 文件。除此之外,其他一切都是默认的 Xampp,我尝试运行的应用程序是来自 modwsgi.readthedocs.io/en/develop/user-guides/… 的应用程序
    猜你喜欢
    • 2014-07-04
    • 2018-10-07
    • 2020-07-10
    • 2013-07-22
    • 2015-11-11
    • 2013-01-19
    • 2014-10-22
    • 2016-08-05
    • 2018-05-02
    相关资源
    最近更新 更多