We run 4 network installations of Wordpress on Windows Server 2008 R2 VPS with Apache 2.2.17 and PHP 5.3.10, and for some reason we regularly get this (approximate) error:
Error log
[Thu Feb 16 15:01:59 2012] [error] [client xxxx] Directory index forbidden by Options directive: C:/_webserver/_www/wp/www/
Access log
host xxxx - - [17/Feb/2012:12:59:23 +0200] "GET / HTTP/1.1" 403 306 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB7.2; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; MATM)"
The “Directory Blocking” error usually means that the directory is trying to access, but there is no file (according to the options directive) that will be displayed, and the list of directories is denied. However, it is not. The error refers to the C:/_webserver/_www/wp/www/ folder, which is webroot for the project, and always had index.php . In addition, httpd.conf configured using: DirectoryIndex index.html index.php
When I see how an error occurs in Apache, I find it unlikely that this could be caused by PHP or Wordpress.
The tough thing is that we don’t know how to reproduce the error, so it’s hard for us to verify this.
What can we do to find out what the problem is? Could this have anything to do with setting up Apache (this seems like an extra question). Could this have anything to do with the file already being read by Apache? Is there a way to get more information about this issue?
I would welcome any help to help me resolve this unpleasant case.
UPDATE
These are the modules that I am currently using.
LoadModule deflate_module modules/mod_deflate.so LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so LoadModule cache_module modules/mod_cache.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule alias_module modules/mod_alias.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule dir_module modules/mod_dir.so LoadModule log_config_module modules/mod_log_config.so LoadModule mime_module modules/mod_mime.so LoadModule php5_module "c:/_webserver/_server/php-5.3.10-Win32-VC9-x86/php5apache2_2.dll"
Options directives:
<Directory /> Options FollowSymLinks ExecCGI AllowOverride None Order deny,allow Allow from all </Directory> <Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
httpd-vhosts.conf is as follows:
NameVirtualHost *:80 <VirtualHost *:80> <Directory "C:/_webserver/_www/sites/www"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> Include "C:/_webserver/_www/sites/htaccess.conf" DocumentRoot "C:/_webserver/_www/sites/www" ServerName xxx ServerAlias xxx CustomLog logs/sites.access.log mycombined ErrorLog logs/sites.error.log </VirtualHost>
I have 5 virtual hosts configured this way, with each of their own errors and access logs. Projects do not use .htaccess , but it is statically set via conf for performance.
The server runs on windows, so MPM configuration is a bit limited.
# WinNT MPM
Final update
Well, I decided to completely disable Apache caching, and since then there have been no more errors. Unfortunately, this week I did not have too much time to conduct proper testing, but at least I know where the problem is. And with a server not so busy, there is no caching yet. I could come back after a while :-)