This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 663250 - Apache not sending HTTP 'Expires' headers' for static content
Apache not sending HTTP 'Expires' headers' for static content
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Usability (Show other bugs)
540
All Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Lestach
Martin Minar
:
Depends On:
Blocks: sat560-lowbug
  Show dependency treegraph
 
Reported: 2010-12-15 01:35 EST by Alan Evans
Modified: 2016-07-03 20:55 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 17:55:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Alan Evans 2010-12-15 01:35:24 EST
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 15:23:35 EST
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 06:30:53 EDT
Patch applied (without jpg and jpeg) to Spacewalk master, de96e1065391cd6bbd85f4fcbbf9dd8e8cecacbb.
Comment 5 Clifford Perry 2013-10-01 17:55:50 EDT
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.