FAQ
Hi.

I have a frustrating problem, which I'm not quite able to debug properly.

I have a webserver running Apache 2.2.21 compiled as worker-MPM with a
suhosin 0.9.32.1-enabled PHP 5.2.17 (using "phpize", not patching)
under suphp 0.7.1, with mod_security 2.6.1 and modsecurity_crs 2.2.1
plus modsecurity_flameeyes.

Some virtualhosts on this server are configured with mod_disk_cache,
and every once in a while, instead of loading index.php, the list of
files in the directory is loaded instead. If I disable mod_disk_cache,
everything works as expected. It also appears to work as expected with
mod_mem_cache. I want to use disk caching, however, as that seems to
be the better solution.

Reproducing the bug is a bit of a PITA, as the bug appears apparently
at random, and only rarely.

It appears as if <IfModule mod_suphp.c> or <IfModule dir_module>
fails, since DirectoryIndex does not contain index.php unless both of
these tests succeeds.

Has anyone seen similar problems?

Here is an example of a bugging virtualhost config:

<VirtualHost CENSORED:80>
ServerAdmin CENSORED
ServerName CENSORED
SuexecUserGroup CENSORED CENSORED
DocumentRoot CENSORED

<IfModule mod_cache.c>
<IfModule !mod_disk_cache.c>
LoadModule disk_cache_module modules/mod_disk_cache.so
</IfModule>
<IfModule mod_disk_cache.c>
CacheEnable disk /
CacheRoot /var/cache/apache2/caches/2va0Vx98
CacheMinFileSize 64
CacheMaxFileSize 500000
</IfModule>
</IfModule>

<IfModule mod_suphp.c>
<IfModule dir_module>
DirectoryIndex index.cgi index.php index.shtml index.html
index.htm index.wml index.pdf
</IfModule>
SetEnv PHPRC /usr/local/php5.2-suphp/lib/
suPHP_Engine on
suPHP_ConfigPath /usr/local/php5.2-suphp/lib/
suPHP_UserGroup CENSORED CENSORED
AddHandler x-httpd-php .php
AddHandler x-httpd-php .php5
<Directory />
suPHP_AddHandler x-httpd-php
</Directory>
</IfModule>
</VirtualHost>


Replacing the caching section with the following seems to work nicely:

<IfModule mod_cache.c>
<IfModule !mod_mem_cache.c>
LoadModule mem_cache_module modules/mod_mem_cache.so
</IfModule>
<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheSize 4096
MCacheMaxObjectCount 1009
MCacheMaxObjectSize 500000
</IfModule>
</IfModule>

--
Jan

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Search Discussions

  • Jan Ingvoldstad at Jan 19, 2012 at 12:38 pm

    On Fri, Nov 11, 2011 at 10:57, Jan Ingvoldstad wrote:
    Has anyone seen similar problems?
    I can't hear the crickets, but apparently, the answer is "no".

    Does anyone then have any useful suggestions on how to go about debugging
    this?

    The documentation for the caching modules is a bit on the thin side.
    --
    Jan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesapache
postedNov 11, '11 at 9:58a
activeJan 19, '12 at 12:38p
posts2
users1
websitehttpd.apache.org
irc#httpd

1 user in discussion

Jan Ingvoldstad: 2 posts

People

Translate

site design / logo © 2022 Grokbase