If you are not compressing content with the IBM® WebSphere® Application Server Edge components or a similar device, consider configuring the IBM HTTP Server to compress certain types of content to improve browser performance.
Before you begin
This is an optional configuration. You do not need to perform this procedure if you are compressing content elsewhere in your network. Compression requires a significant amount of CPU; you must monitor resource availability if you choose to use this option.
About this task
When adding directives to the httpd.conf
file, be sure to add them in the same order in which they are defined in these steps.
To specify which types of files to compress, complete the following steps:
- Using a text editor, open the httpd.conf file. The file is stored in the following directory by default:
Find the following entry in the configuration file:
- AIX®: /usr/IBM/HTTPServer/conf
- Linux®: /opt/IBM/HTTPServer/conf
- Microsoft Windows®: C:\IBM\HTTPServer\conf
If the following line is present in the httpd.conf file, comment it out or remove it. This line will cause all served content to be compressed, which will cause issues with Microsoft Internet Explorer 6:
LoadModule deflate_module modules/mod_deflate.so
If this entry is not present, add it.
Add the following statements to compress multiple content types used by Lotus® Connections:
Add the following statement to compress binary content downloaded from Activities to work around a Microsoft Internet Explorer 6 issue with some binary content:
#Only the specified MIME types will be compressed.
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/plain text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/atom+xml
Add the following statements to specifically indicate that only text/html content should be compressed for older browsers. Uncomment the final line if your environment includes support for Microsoft Internet Explorer 6 SP1 or if you experience web browser hangs or other issues with Microsoft Internet Explorer 6 releases after SP1.
<Location /activities >
AddOutputFilterByType DEFLATE application/octet-stream
Add the following statement to specifically indicate that image files and binaries must not be compressed to prevent web browser hangs:
#Ensure that only text/html content is compressed for older browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0  no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Uncomment the following line if you encounter freezing issues with Internet Explorer 6
#BrowserMatch \bMSIE\s6.0 gzip-only-text/html
Add the following statement to ensure that proxy servers do not modify the User Agent header needed by the above statements:
# Ensures that images and executable binaries are not compressed
SetEnvIfNoCase Request_URI \\.(?:gif|jpe?g|png|exe)$ no-gzip dont-vary
Save and close the configuration file.
Restart IBM HTTP Server.
# Make sure proxies do not deliver the wrong content
Header append Vary User-Agent env=!dont-vary
If the following line is commented out, remove the commenting from it:
LoadModule headers_module modules/mod_headers.so
Parent topic: Configuring IBM HTTP Server
Previous topic: Adding certificates to the WebSphere trust store
Next topic: Updating web addresses in IBM HTTP Server