We get some php errors in our server log, that the DirectoryIndex could not be found in /skin/frontend/theme/theme/. But that seems to be right.

That error only display sometimes and on different pages.

Anyone who knows why we get this error?

[Wed Mar 14 09:57:32.323561 2018] [autoindex:error] [pid 29638] [client IP:33912] AH01276: Cannot serve directory /home/user/domains/domain.com/private_html/skin/frontend/theme/theme/: No matching DirectoryIndex (index.php) found, and server-generated directory index forbidden by Options directive, referer: https://www.example.com

The error message says that the server was requested to deliver http://your-shop.com/skin/frontend/theme/theme/.

If you see your access log and look up the same time stamp as given in the error log you'll probably find something like this:

ip-address - - [14/Mar/2018:09:57:32 +0100] "GET /some/path/relative/to/your/domain HTTP/1.0" 200 1324 "http://your-shop.com/skin/frontend/theme/theme/" "Mozilla/5.0 (W...

As a summary there are basically two reasons for this log entry:

  1. Some user tried (un-)intentionally to access http://your-shop.com/skin/frontend/theme/theme/ from browser directly
  2. Some (Magento) module is incorrectly asking (i.e. trying to implement) a skin file (this could be a stylesheet, a javascript-file, an image, ...) but does not specify what to load. This can even result from a content element (static block, page, or any other text area that allows HTML input) that for example got an improper img tag set (i.e. <img src="" />).

Hence, first of all you need to find what area of your shop is causing the error log entry - because based on the information given in your question it is impossible to tell where to look (it could be a path to a file where the last part is meant to be fetched from the database, yet there is just no result on that SELECT available; it can be a general coding issue somewhere; it could be some bad CMS entry; ...). Probably hitting F12 in your browser and navigating through the shop should help you to find the problem. It's quit likely that the messaged printed to your error log comes along with a 404 in the console log in your browser.

Last but not least: Even though it is stated as an "error" in the log it is basically the best thing that can happen to your system. Because another possible behavior is that instead of logging an error is that the server returns a directory index (a list of all files and folders within the requested directory) which in almost all cases is not desired. The behavior of the server in general is specified within your vhost and/or .htaccess file.

  • Thanks a lot! The problem was indeed a layout file that was loading a incorrect path. – JGeer Mar 19 '18 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.