Set HTTP Response Header Cache-Control and enable mod_cache for higher performance
LoadModule headers_module modules/mod_headers.so
<Location ~ "\.(jsgifjpgjpegpngjpe)$">
Header add Cache-Control "public, max-age=432000, post-check=172000"
</Location>
These lines enable the module mod_headers.so and are setting a Cache-Control header. A Cache-Control header enables clients, webservers and proxys to cache pictures.
Adding the Cache-Control-Header is very useful for older Liferay-Versions.
To enable a IBM HTTP Server to cache those pictures add additionally these lines:
LoadModule cache_module modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheSize 4096
MCacheMaxObjectCount 100
MCacheMinObjectSize 1M
CacheMaxObjectSize 2048
</IfModule>
Link to sample httpd.conf
THANKS¡¡¡ Really really Great BLOG¡¡¡
ReplyDeletetake a look mine:
http://xosemapena.blogspot.com/
one question to ask help.
ReplyDeleteIf I didn't install IBM HTTP Server, only installed WAS6.0 app server, how can I set HTTP response header in the server?
Simply to say, I can not find any file named "httpd.conf". how can I do to set HTTP header??
the httpd.conf is part of the ibm http server config. so you need to install IBM HTTP Server.
ReplyDeleteIf you want to modify a HTTP Header, try to edit the Headers in a JSP which is deployed in your AppServer.
Google should know more.