17

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?

2
  • 1
    This is probably an Apache configuration issue (Like a Deny from xyz directive somewhere). Impossible to give any more detailed information without knowing the Apache configuration settings involved Commented Dec 5, 2010 at 19:33
  • What do you need to know? I have Allow from All in my vhost.conf. The IP that is being denied access is my server IP Commented Dec 5, 2010 at 20:15

4 Answers 4

23

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

Sign up to request clarification or add additional context in comments.

4 Comments

This is very helpful and seemed to fix the log spam
There is NO file called local.xml here app/design/adminhtml/default/default/layout/local.xml in magento 1.9
@PratikCJoshi You may create it if not exists
@itsazzad then you should edit the post and tell it.
12

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

1 Comment

How come when apc is enabled, I get that error log message about being denied (local.xml) and when I shut it off, I do not get log entries?
4

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.

1 Comment

Thanks but the IP it is denying access to is my server's IP
3

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.