开发者

magento client denied by server configuration

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?


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


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...


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜