Determining which files to compressIf you are not compressing content with the IBM WAS Edge components or a similar device, consider configuring the IBM HTTP Server to compress certain types of content to improve browser performance.
Before you beginThis 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; monitor resource availability if you choose to use this option.
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...
- Use a text editor, open the httpd.conf file. The file is stored in the following directory by default:
- AIX : /usr/IBM/HTTPServer/conf
- Linux™: /opt/IBM/HTTPServer/conf
- Microsoft Windows™: C:\IBM\HTTPServer\conf
- Find the following entry in the configuration file:
LoadModule deflate_module modules/mod_deflate.so
If this entry is not present, add it.
- 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:
- Add the following statements to compress multiple content types used by IBM 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:
<Location /activities > AddOutputFilterByType DEFLATE application/octet-stream </Location>
- 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.
#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 specifically indicate that image files and binaries must not be compressed to prevent web browser hangs:
# Ensures that images and executable binaries are not compressed SetEnvIfNoCase Request_URI \\.(?:gif|jpe?g|png|exe)$ no-gzip dont-vary
- Add the following statement to ensure that proxy servers do not modify the User Agent header needed by the above statements:
# 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
- Save and close the configuration file.
- Restart IBM HTTP Server.
Parent topicConfigure IBM HTTP Server
Previous topic: Add certificates to the WebSphere trust store
Next topic: Update web addresses in IBM HTTP Server