I did the setup of apache 2.4 with the below configurations
ProxyPass / "http://localhost:9081/"
ProxyPassReverse / "http://localhost:9081/"
<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
CacheRoot "/opt/apicache/"
CacheDefaultExpire 3600
CacheEnable disk "/"
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
# Enable the X-Cache-Detail header
CacheDetailHeader on
</IfModule>
</IfModule>
Also I changed the CacheRoot Permission by following
mkdir -p /opt/apicache/
chown root:www-data /opt/apicache/ -R
chmod 775 /opt/apicache/ -R
apache log level is set debug
LogLevel debug
Quite not sure why apache 2.4 not caching anything to the cache root and also does not show any logs in error logs