magento 客户端被服务器配置拒绝

发布于 2024-10-05 19:02:36 字数 189 浏览 4 评论 0原文

Magento 除了白色主页外不显示任何内容,在 error_log 中给出的错误是:

client denied by server configuration: /var/www/httpdocs/app/etc/local.xml 

我可以很好地访问管理区域,有谁知道为什么会发生这种情况?

Magento isn't displaying anything but a white homepage, in the error_log the error given is:

client denied by server configuration: /var/www/httpdocs/app/etc/local.xml 

I can access the admin area fine, does anyone know why this might happen?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

雅心素梦 2024-10-12 19:02:36

该日志条目似乎是由 magento 进行的调用创建的,以确保您已正确保护您的管理员。它不是一个错误,它实际上是您希望看到的东西,因为它有效地表明您的管理员是安全的。显然这只是日志中的噪音。

关于如何解决此问题并加快管理页面加载速度,有一个非常优雅的解决方案,如下所述:
http://www.yireo.com/tutorials/ magento/magento-administration/1322-client-denied-by-server-configuration-appetclocalxml

本质上是在下面的位置创建文件,其中包含显示的内容。添加文件后:

app/design/adminhtml/default/default/layout/local.xml

包含内容:

<layout>
    <default>
        <remove name="notification_security" />
        <remove name="notification_survey" />
    </default>
</layout>

请记住刷新缓存:“系统”>“缓存管理

The log entry appears to be created by calls magento is making to ensure you have secured your admin properly. Rather than it being an error it is actually something you want to see as it is effectively saying your admin is secure. Clearly this is just noise in your logs.

There is a really elegant solution on how to fix this and speed up your admin page load described here:
http://www.yireo.com/tutorials/magento/magento-administration/1322-client-denied-by-server-configuration-appetclocalxml

Essentially create the file in the location below with the contents shown. Once you have added the file:

app/design/adminhtml/default/default/layout/local.xml

With the contents:

<layout>
    <default>
        <remove name="notification_security" />
        <remove name="notification_survey" />
    </default>
</layout>

Remember to flush your caches: System > Cache Management

橙味迷妹 2024-10-12 19:02:36

好的...此页面上有一些混合问题,这是我尝试清除这些问题...

客户端被服务器配置拒绝:/var/www/httpdocs/app/etc/local.xml

艾伦:是正确的,这与以下内容无关您的问题...从 1.4 开始,Magento 会用此消息填充您的错误日志,您在管理区域中访问的每个页面都会出现一条消息...这是 Magento“测试”您的配置文件以查看是否可以看到它的结果是世界...有点愚蠢,因为这是错误表明它受到保护...

当您浏览该页面时您正在寻找的解决方案似乎是“破解核心”: http://www.magentocommerce.com/boards/viewthread/213947/#t306425

指出 APC 问题因为 APC 与 Magento 配合不佳:-

将 Magento 缓存从“apc”切换回“文件”...在将 Magento 切换回使用缓存之前,您必须清除 var/cache 目录“rm -R var/cache/*”来自 APC 的方法文件...否则 Magento 将读取旧的缓存和 barf...出于同样的原因,在切换到使用 APC 之前通过重新启动 Apache 来清除 APC 也是明智的...

最后...原始问题:-

白屏...很可能是由于 PHP 错误并且您的服务器关闭了显示错误...首先从 Magento 文档根目录“rm -R var/cache/*”中手动清除命令行上的缓存...这可能会解决,因为损坏的缓存可能会导致此问题...如果没有...检查 php 配置,“display_errors”等于 1 或打开...要查看 PHP 设置,在 Magento 文档根目录中,在命令行 $echo " " > phpinfo.php... 在浏览器中从 magento 域请求 phpinfo.php 并检查 php 设置,根据需要进行更改...

其他:将errors/local.xml.sample 重命名为errors/local.xml 将导致您能够看到完整的 Magento 错误异常...

希望这对某人有帮助...

Okay... few mixed issues on this page, here is my attempt to clear these up...

Client denied by server configuration: /var/www/httpdocs/app/etc/local.xml

Alan: is correct is this unrelated to your issue... Magento as of 1.4 fills your error log with this message, one for each page you access in the Admin area... This is as a result of Magento "testing" your config file to see if it can be seen be the world... Kinda dumb as this is error is showing it is protected...

The solution to which you were looking for when you came accross the page, seems to be to "hack the core": http://www.magentocommerce.com/boards/viewthread/213947/#t306425

APC issue stated as APC not palying nicely with Magento:-

Switching Magentos caching backed from "apc" back to "files"... You must clear your var/cache directory "rm -R var/cache/*" before switching Magento back to use cache method files from APC... otherwise Magento will read old cache and barf... It is also sensible for the same reason to clear APC by restarting Apache prior to switching to use APC...

And Finally... Original question:-

White screen... most likely as a result of a PHP error and your server having display errors turned off... Firstly manually clear cache on command line from within Magento document root "rm -R var/cache/*"... this may solve as broken cache can cause this... if not... check php config that "display_errors" equals 1 or On... To view PHP settings, in Magento document root, on command line $echo "<?php phpinfo() ?>" > phpinfo.php... request phpinfo.php in browser from magento domain and review php settings, change as necessary...

Other: Renaming errors/local.xml.sample to errors/local.xml will result in you being able to see the complete Magento Error Exception...

Hope this helps someone...

昇り龍 2024-10-12 19:02:36

该错误的措辞

client denied by server configuration: /var/www/httpdocs/app/etc/local.xml 

是与您的问题无关的 Apache 错误消息。有人尝试通过 Web 浏览器直接访问您的 local.xml 文件,但被服务器配置阻止。这是正确的行为。

您的白屏错误是由于其他原因而发生的。

  1. 日志中是否还有其他错误?

  2. 配置 PHP 以单独记录 PHP 错误。

  3. 您可以访问 magento 管理员,因此打开 Magento 特定错误的日志记录

完成上述操作后,将您的商店配置为仅服务器文件到您的 IP,以便您可以找出日志(Apache、PHP 或 Magento)中的哪个错误与您的直接请求相关。

The wording on that error

client denied by server configuration: /var/www/httpdocs/app/etc/local.xml 

is an Apache error message that's unrelated to your problem. Someone tried to directly access your local.xml file via a web browser but were blocked by the server configuration. This is correct behavior.

Your white screen error is happening for another reason.

  1. Are there other errors in the log?

  2. Configure PHP to log PHP errors separately.

  3. You can access the magento admin, so turn on logging for Magento specific errors

With the above in place, configure your store to only server file to your IP so you can figure out which error in the log(s) (Apache, PHP, or Magento) is related to your direct request.

别靠近我心 2024-10-12 19:02:36

APC 缓存显然不能很好地与 Magento 配合使用,禁用它会引发过时主题产生的 PHP 错误

APC caching apparently doesn't play nicely with Magento, disabling it threw a PHP error that an outdated theme was producing

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文