<bdo id='J9Ajf'></bdo><ul id='J9Ajf'></ul>
    <tfoot id='J9Ajf'></tfoot>

    <legend id='J9Ajf'><style id='J9Ajf'><dir id='J9Ajf'><q id='J9Ajf'></q></dir></style></legend>

        <small id='J9Ajf'></small><noframes id='J9Ajf'>

      1. <i id='J9Ajf'><tr id='J9Ajf'><dt id='J9Ajf'><q id='J9Ajf'><span id='J9Ajf'><b id='J9Ajf'><form id='J9Ajf'><ins id='J9Ajf'></ins><ul id='J9Ajf'></ul><sub id='J9Ajf'></sub></form><legend id='J9Ajf'></legend><bdo id='J9Ajf'><pre id='J9Ajf'><center id='J9Ajf'></center></pre></bdo></b><th id='J9Ajf'></th></span></q></dt></tr></i><div id='J9Ajf'><tfoot id='J9Ajf'></tfoot><dl id='J9Ajf'><fieldset id='J9Ajf'></fieldset></dl></div>
      2. Apache 权限被拒绝

        Apache permission denied(Apache 权限被拒绝)

        <small id='qgnAE'></small><noframes id='qgnAE'>

          <tbody id='qgnAE'></tbody>

          • <bdo id='qgnAE'></bdo><ul id='qgnAE'></ul>
            <i id='qgnAE'><tr id='qgnAE'><dt id='qgnAE'><q id='qgnAE'><span id='qgnAE'><b id='qgnAE'><form id='qgnAE'><ins id='qgnAE'></ins><ul id='qgnAE'></ul><sub id='qgnAE'></sub></form><legend id='qgnAE'></legend><bdo id='qgnAE'><pre id='qgnAE'><center id='qgnAE'></center></pre></bdo></b><th id='qgnAE'></th></span></q></dt></tr></i><div id='qgnAE'><tfoot id='qgnAE'></tfoot><dl id='qgnAE'><fieldset id='qgnAE'></fieldset></dl></div>

                <legend id='qgnAE'><style id='qgnAE'><dir id='qgnAE'><q id='qgnAE'></q></dir></style></legend>
                  <tfoot id='qgnAE'></tfoot>
                  本文介绍了Apache 权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我刚刚在 Windows 上安装了一个新的 Apache 2.4.2,带有 PHP 快速 cgi 构建.

                  I've just installed a new Apache 2.4.2 with Php fast cgi build on windows.

                  然后我修改了 httpd.conf 添加以下内容:

                  Then I modified the httpd.conf adding the following:

                  LoadModule fcgid_module modules/mod_fcgid.so  
                  FcgidInitialEnv PHPRC "C:/SITE/PHP"
                  AddHandler fcgid-script .php
                  FcgidWrapper "C:/SITE/PHP/php-cgi.exe" .php
                  
                  DocumentRoot "C:/SITE/localhost/www"
                  <Directory "C:/SITE/localhost/www">
                      Order allow,deny
                      Allow from all
                  </Directory>
                  

                  但是,当我尝试打开我的网站时,它说:

                  However when I try to open my site, it says:

                  Forbidden 您无权访问/在此服务器上.

                  任何想法可能是什么问题?

                  Any ideas what might be the problem?

                  推荐答案

                  这是正确的做法:(感谢 DaveRandom)

                  This was the correct way to do it: (thanks to DaveRandom)

                  <Directory "C:/SITE/localhost/www">
                      Options ExecCGI
                      AllowOverride all
                      Require all granted
                  </Directory>
                  

                  Dave Random 进一步解释:

                  在对此进行了一些实验后,我发现了使其成为正确答案的细微差别,这是特定于 Apache 2.3+ 的.似乎 mod_authz_host 指令优先于 mod_access_compat 指令,这在目录树中一直向上冒泡.这意味着,如果您从 Apache 2.2 迁移到 Apache 2.4 并逐字使用 2.2 httpd.conf,它将起作用.

                  After a little experimentation with this, I have discovered the nuance that makes this the correct answer, which is specific to Apache 2.3+. It seems that mod_authz_host directives take precedence over mod_access_compat directives, and this bubbles all the way up the directory tree. What this means is that if you are migrating from Apache 2.2 to Apache 2.4 and you use your 2.2 httpd.conf verbatim, it will work.

                  但是,如果您执行 2.4 的新安装并基于默认的 2.4 httpd.conf 进行配置,Allow 指令将不起作用,因为默认设置顶级部分使用 Require all denied 指令而不是 Deny from all,这优先于树更高的任何后续 Allow 指令.总而言之,如果您将 Order/Allow/Deny 指令迁移到其等效的 Requires,那么您必须尝试所有这些指令,否则您会发现您得到了意想不到的 403.

                  If, however, you perform a new install of 2.4 and base your config on the default 2.4 httpd.conf, Allow directives won't work, because the default top level section uses a Require all denied directive instead of Deny from all, and this takes precedence over any subsequent Allow directives higher up the tree. The long of the short of this is that if you are migrating your Order/Allow/Deny directives to their equivalent Requires, then you must chance all of them or you will find you get 403s you weren't expecting.

                  这篇关于Apache 权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                    <bdo id='nRszf'></bdo><ul id='nRszf'></ul>
                      1. <legend id='nRszf'><style id='nRszf'><dir id='nRszf'><q id='nRszf'></q></dir></style></legend>
                          <tbody id='nRszf'></tbody>

                          <small id='nRszf'></small><noframes id='nRszf'>

                            <i id='nRszf'><tr id='nRszf'><dt id='nRszf'><q id='nRszf'><span id='nRszf'><b id='nRszf'><form id='nRszf'><ins id='nRszf'></ins><ul id='nRszf'></ul><sub id='nRszf'></sub></form><legend id='nRszf'></legend><bdo id='nRszf'><pre id='nRszf'><center id='nRszf'></center></pre></bdo></b><th id='nRszf'></th></span></q></dt></tr></i><div id='nRszf'><tfoot id='nRszf'></tfoot><dl id='nRszf'><fieldset id='nRszf'></fieldset></dl></div>
                            <tfoot id='nRszf'></tfoot>