php magento 客户端被服务器配置拒绝
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4360574/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
magento client denied by server configuration
提问by Ashley
Magento isn't displaying anything but a white homepage, in the error_log the error given is:
Magento 只显示一个白色主页,在 error_log 中给出的错误是:
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?
我可以正常访问管理区域,有人知道为什么会发生这种情况吗?
采纳答案by Ashley
APC caching apparently doesn't play nicely with Magento, disabling it threw a PHP error that an outdated theme was producing
APC 缓存显然不能很好地与 Magento 配合使用,禁用它会引发一个过时的主题产生的 PHP 错误
回答by theINtoy
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.
日志条目似乎是由 magento 发出的调用创建的,以确保您已正确保护您的管理员。它实际上不是一个错误,而是您希望看到的,因为它实际上表明您的管理员是安全的。显然,这只是日志中的噪音。
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
关于如何解决此问题并加快管理页面加载速度,这里有一个非常优雅的解决方案: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
记得刷新你的缓存:系统 > 缓存管理
回答by Flipmedia
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
客户端被服务器配置拒绝:/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...
Alan:正确的是这与您的问题无关... Magento 从 1.4 开始使用此消息填充您的错误日志,您在管理区域中访问的每个页面都有一个...这是 Magento“测试”您的配置的结果文件以查看它是否可以被视为世界......有点愚蠢,因为这是错误显示它受到保护......
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
当您遇到页面时,您正在寻找的解决方案似乎是“破解核心”:http: //www.magentocommerce.com/boards/viewthread/213947/#t306425
APC issue stated as APC not palying nicely with Magento:-
APC 问题表明 APC 与 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...
将 Magentos 缓存从“apc”切换回“文件”...在切换回 Magento 以使用来自 APC 的缓存方法文件之前,您必须清除 var/cache 目录“rm -R var/cache/*”...否则 Magento将读取旧的缓存和 barf...出于同样的原因,在切换到使用 APC 之前通过重新启动 Apache 来清除 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...
白屏...很可能是由于 PHP 错误并且您的服务器显示错误已关闭...首先从 Magento 文档根目录“rm -R var/cache/*”中手动清除命令行上的缓存...这可能会解决,因为损坏的缓存会导致这个...如果不是...检查php配置“display_errors”等于1或On...要查看PHP设置,在Magento文档根目录,在命令行$echo "<?php phpinfo() ?>" > phpinfo.php
...请求phpinfo。从 magento 域浏览器中的 php 并查看 php 设置,根据需要进行更改...
Other: Renaming errors/local.xml.sample to errors/local.xml will result in you being able to see the complete Magento Error Exception...
其他:将 errors/local.xml.sample 重命名为 errors/local.xml 将导致您能够看到完整的 Magento 错误异常...
Hope this helps someone...
希望这可以帮助某人...
回答by Alan Storm
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.
是与您的问题无关的 Apache 错误消息。有人试图通过 Web 浏览器直接访问您的 local.xml 文件,但被服务器配置阻止。这是正确的行为。
Your white screen error is happening for another reason.
您的白屏错误发生的另一个原因。
Are there other errors in the log?
Configure PHP to log PHP errors separately.
You can access the magento admin, so turn on logging for Magento specific errors
日志中是否还有其他错误?
配置 PHP 以单独记录 PHP 错误。
您可以访问 magento 管理员,因此请打开 Magento 特定错误的日志记录
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.
完成上述操作后,将您的商店配置为仅向您的 IP 发送服务器文件,以便您确定日志(Apache、PHP 或 Magento)中的哪个错误与您的直接请求相关。