Bug 1296262 - CacheEnable does not understand http url
CacheEnable does not understand http url
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: httpd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Web Stack Team
BaseOS QE - Apps
Depends On:
  Show dependency treegraph
Reported: 2016-01-06 13:18 EST by Mike Millson
Modified: 2016-01-08 01:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-08 01:14:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Apache Bugzilla 53787 None None None 2016-01-06 13:20 EST

  None (edit)
Description Mike Millson 2016-01-06 13:18:31 EST
Apache documentation[1] claims you can specify url string such as:
CacheEnable  disk  http://www.example.org/


CacheEnable  disk  http://

However, httpd apparently does not recognize these url strings, as it never looks to cache when they are used.

It appears CacheEnable only works file paths:
CacheEnable disk /


CacheEnable disk /app/

I tested on both RHEL 7.2 and upstream httpd 2.4.18, and both behave the same. 

It appears to be this upstream bug:

Comment 1 Mike Millson 2016-01-06 13:20:10 EST
To reproduce on RHEL 7.2:

1. Tomcat content
> mkdir /var/lib/tomcat/webapps/hello/
> touch /var/lib/tomcat/webapps/hello/helloworld.txt
> put some text in helloworld.txt
> chmod -R root.tomcat /var/lib/tomcat/webapps/hello/

2. httpd.conf

LogLevel debug

<Proxy balancer://mycluster>
  BalancerMember ajp:// route=node0 loadfactor=1 ping=10 ttl=600 max=60
  ProxySet stickysession=JSESSIONID|jsessionid timeout=10

ProxyStatus On
ProxyPassMatch ^/hello(.*) balancer://mycluster/hello$1

CacheRoot "/var/cache/httpd/proxy/"
CacheEnable disk /
#CacheEnable disk /hello/
#CacheEnable disk http://localhost/
#CacheEnable disk http://
CacheDirLevels 3
CacheDirLength 5
CacheIgnoreCacheControl On
CacheIgnoreNoLastMod On
CacheIgnoreQueryString On
CacheQuickHandler off

3. Force browser to reload helloworld.txt (ctrl+f5 with Firefox).

4. mod_cache is not part of the request processing when CacheEnable is the following:
CacheEnable disk http://localhost/
CacheEnable disk http://
Comment 2 Jan Kaluža 2016-01-07 08:12:21 EST
According to documentation, "http://" or "http://localhost" works only for forward proxies. You are using reverse prosy for which this configuration does not work according to documentation. What's the real problem you are trying to solve?

Note You need to log in before you can comment on or make changes to this bug.