Bug 663250 - Apache not sending HTTP 'Expires' headers' for static content
Summary: Apache not sending HTTP 'Expires' headers' for static content
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Usability
Version: 540
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On:
Blocks: sat560-lowbug
TreeView+ depends on / blocked
 
Reported: 2010-12-15 06:35 UTC by Alan Evans
Modified: 2016-07-04 00:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-01 21:55:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 663248 0 low CLOSED mod_proxy_ajp does not use connection pooling because of RewriteRule 2021-02-22 00:41:40 UTC

Internal Links: 663248

Description Alan Evans 2010-12-15 06:35:24 UTC
After inspecting HTTP headers I found that much of the static content in the Satellite web UI is not being sent with HTTP Expires headers.  Since the pages can be rather media rich with static content and JavaScript files this drastically increases page load time.

In our Satellite server I have added the following to /etc/httpd/conf.d/zz-spacewalk-www.conf and have been able to drastically reduce page load times and increase responsiveness of our Satellite server.

ExpiresActive On
<FilesMatch "\.(js|css|ico|gif|jpg|jpeg|png|pdf)$">
  ExpiresDefault A86400
  Header append Cache-Control "public"
</FilesMatch>

We have been using this for approximately 4-5 weeks and have had no negative consequences.  We have about 625 RHEL 4 and 5 boxes registered to the system which is a VMWare guest with 4vCPUs, 8GB of RAM, embedded database and Raw Mapped SAN LUNs for /rhnsat and /var/satellite.  Between this change and the one suggested in bug 663248 our RHN Satellite server feels like an entirely new system.

https://bugzilla.redhat.com/show_bug.cgi?id=663248

I have taken a relatively conservative stance setting the header one day ahead and only on a few file extensions that are very likely to be static in nature.

Someone with a bit more insight into how Satellite works might be able to make more aggressive changes.

Could the Apache configuration be modified in later releases to set the Expires header on static files in the way I have suggested or similar?

Regards,
-Alan

Comment 1 Lukas Zapletal 2011-01-04 20:23:35 UTC
No problem for my POV but we should make sure it does not affect monitoring graph images. I am not sure if they have .gif/.png extensions.

Comment 2 Jan Pazdziora 2012-10-29 10:30:53 UTC
Patch applied (without jpg and jpeg) to Spacewalk master, de96e1065391cd6bbd85f4fcbbf9dd8e8cecacbb.

Comment 5 Clifford Perry 2013-10-01 21:55:50 UTC
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1395.html


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