RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1296262 - CacheEnable does not understand http url
Summary: CacheEnable does not understand http url
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: httpd
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-06 18:18 UTC by Mike Millson
Modified: 2021-01-14 09:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-08 06:14:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache Bugzilla 53787 0 None None None 2016-01-06 18:20:51 UTC

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

or 

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 /

or 

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:
https://bz.apache.org/bugzilla/show_bug.cgi?id=53787

References:
[1]https://httpd.apache.org/docs/2.4/mod/mod_cache.html#cacheenable

Comment 1 Mike Millson 2016-01-06 18:20:10 UTC
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://127.0.0.1:8009 route=node0 loadfactor=1 ping=10 ttl=600 max=60
  ProxySet stickysession=JSESSIONID|jsessionid timeout=10
</Proxy>

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 13:12:21 UTC
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.