Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 518
Ashley Avatar asked Dec 05 '10 19:12

Ashley


2 Answers

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

like image 169
theINtoy Avatar answered Oct 22 '22 06:10

theINtoy


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

like image 12
Flipmedia Avatar answered Oct 22 '22 07:10

Flipmedia