mod_cache.c mod_disk_cache.c mod_mem_cache.c

jmginer

Well-Known Member
Jul 26, 2006
150
4
168
Alicante
cPanel Access Level
Root Administrator
Hi,

I have compiled Apache with cache modules in EA:

Modules are been loaded

# httpd -l | grep cache
mod_file_cache.c
mod_cache.c
mod_disk_cache.c
mod_mem_cache.c


but in httpd.conf I dont have any reference for this modules configuration,
like: mod_cache - Apache HTTP Server

CacheRoot folder, size, etc...

Will be interesting a sample config added by default.
Somebody can explain more in this term?

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello :)

The modules are built in Apache if you select them via EasyApache. EX:

Code:
# httpd -l|grep cache
  mod_file_cache.c
  mod_cache.c
Here is a sample configuration from the Mod_Cache documentation you could use under "Pre Main Include" in "WHM Home » Service Configuration » Apache Configuration » Include Editor":

Code:
<IfModule mod_disk_cache.c>
CacheRoot c:/cacheroot
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
</IfModule>
Naturally, this is just a sample configuration, so you would have to modify it for your own system.

Thank you.
 

konrath

Well-Known Member
May 3, 2005
366
0
166
Brasil
Hello cPanelMichael

I've tried the configuration below, but no file is placed inside CacheRoot "/opt/apicache/"

<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
CacheDefaultExpire 3600
CacheEnable disk /
CacheRoot "/opt/apicache/"
CacheDirLevels 2
CacheDirLength 1
CacheMaxFileSize 1000000
CacheMinFileSize 1
CacheIgnoreCacheControl On
CacheIgnoreNoLastMod On
CacheIgnoreQueryString Off
CacheIgnoreHeaders None
CacheLastModifiedFactor 0.1
CacheDefaultExpire 3600
CacheMaxExpire 86400
CacheStoreNoStore On
CacheStorePrivate On
</IfModule>
</IfModule>

Thank you
Marcelo Konrath
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
I have moved this thread into the "Optimization" forum. You may receive more user feedback here, however you may also want to consult with a qualified system administrator for additional assistance with these customizations.

Thank you.
 

upsforum

Well-Known Member
Jul 27, 2005
473
0
166
I have same problem, rebuild with EasyApache and mod_cache + mod_disk_cache, added code in pre Main include but not fiels is writed in cacheroot