Apache and mod cache for specific domain

Zordon

Verified User
Joined
Dec 11, 2009
Messages
13
Hi,
I want to enable mod cache for a domain on my server (http://httpd.apache.org/docs/2.1/mod/mod_cache.html).

I entered the sample code from the apache documentation in DirectAdmin under Custom HTTPD Configurations:
Code:
LoadModule cache_module modules/mod_cache.so

<IfModule mod_cache.c>
#LoadModule disk_cache_module modules/mod_disk_cache.so
# If you want to use mod_disk_cache instead of mod_mem_cache,
# uncomment the line above and comment out the LoadModule line below.
<IfModule mod_disk_cache.c>
CacheRoot c:/cacheroot
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
</IfModule>

LoadModule mem_cache_module modules/mod_mem_cache.so
<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheSize 1024
MCacheMaxObjectCount 100
MCacheMinObjectSize 1
MCacheMaxObjectSize 2048
</IfModule>

# When acting as a proxy, don't cache the list of security updates
CacheDisable http://security.update.server/update-list/
</IfModule>

But after that apache shuts down and I can't start it anymore (DirectAdmin always says "an error has occured" without any further details). The apache error log says:
Code:
[Thu Jun 17 02:38:04 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:38:04 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:38:04 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:38:04 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:38:04 2010] [notice] Apache/2.2.12 (Unix) mod_ssl/2.2.12 OpenSSL/0.9.8g DAV/2 PHP/5.2.10 configured -- resuming normal operations
[Thu Jun 17 02:38:17 2010] [notice] caught SIGTERM, shutting down
[Thu Jun 17 02:42:37 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:42:37 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:42:37 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:42:37 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:42:37 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jun 17 02:42:38 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:42:38 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:42:38 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:42:38 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:42:38 2010] [notice] Apache/2.2.12 (Unix) mod_ssl/2.2.12 OpenSSL/0.9.8g DAV/2 PHP/5.2.10 configured -- resuming normal operations
[Thu Jun 17 02:43:01 2010] [notice] caught SIGTERM, shutting down
[Thu Jun 17 02:43:05 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:43:05 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:43:05 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:43:05 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:43:05 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jun 17 02:43:06 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:43:06 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:43:06 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:43:06 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:43:06 2010] [notice] Apache/2.2.12 (Unix) mod_ssl/2.2.12 OpenSSL/0.9.8g DAV/2 PHP/5.2.10 configured -- resuming normal operations
[Thu Jun 17 02:47:08 2010] [notice] caught SIGTERM, shutting down
[Thu Jun 17 02:49:30 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:49:30 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:49:30 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:49:30 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:49:30 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jun 17 02:49:31 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:49:31 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:49:31 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:49:31 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:49:31 2010] [notice] Apache/2.2.12 (Unix) mod_ssl/2.2.12 OpenSSL/0.9.8g DAV/2 PHP/5.2.10 configured -- resuming normal operations
[Thu Jun 17 02:50:02 2010] [notice] caught SIGTERM, shutting down
[Thu Jun 17 02:50:05 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:50:05 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:50:05 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:50:05 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:50:05 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jun 17 02:50:06 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:50:06 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:50:06 2010] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Jun 17 02:50:06 2010] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Jun 17 02:50:06 2010] [notice] Apache/2.2.12 (Unix) mod_ssl/2.2.12 OpenSSL/0.9.8g DAV/2 PHP/5.2.10 configured -- resuming normal operations
[Thu Jun 17 02:58:02 2010] [notice] caught SIGTERM, shutting down

After I remove the mod cache configuration I can start apache again.
Any ideas how to fix this?
Thanks
 
Last edited:
Back
Top