Forum Moderators: phranque
This is covered in the Apache documentation. Have a look at this page:
[httpd.apache.org...]
The section you want is almost at the end of the page - "Do not log requests for images in the access log"
My question was not perfect btw. I do meant how to do this without server owner (hoster) help. He do not want to do this forcing me to shift to more expensive plan. The trafic is growing, logs are growing too "eating" disk space completely, and this results in statistics absence until log rotates :(. I've partially resolved the problem yesterday by uniting all navigation menu images in one img (let this works as an img MAP - less urls - smaller log file ;)
I assume you've already made sure your images are marked as cacheable, so that return visitors won't usually have to re-load images.
Jim
Another way is more complex, but gives finer control. Here's an example:
# Set up Cache Control headers
ExpiresActive On
# Default - Set http header to expire everything 2 weeks from last access, set must-revalidate
ExpiresDefault A604800
Header append Cache-Control: "must-revalidate"
# Apply a customized Cache-Control header to "special" and frequently-updated files
<FilesMatch "^(test[0-9]?¦404¦410¦403[a-z]?)\.html$">
ExpiresDefault A1
Header set Cache-Control: "no-cache, must-revalidate"
</FilesMatch>
<FilesMatch "^(calendars¦ev_sched)\.html$">
ExpiresDefault A14400
</FilesMatch>
<FilesMatch "^index\.htm">
ExpiresDefault A7200
</FilesMatch>
<FilesMatch "^co_style\.css$">
ExpiresDefault A7200
</FilesMatch>
<FilesMatch "^robots">
ExpiresDefault A7200
</FilesMatch>
Change all broken pipe "¦" characters above to solid pipes before use -- posting on this board modifies them.
Jim