Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I using IIS 8.5 with access logs. But the IIS is also logging static content like css/js files and images. This is very useless and will cause unnecessary I/O. So is there a way to disable the access log for individual file types?

I came from linux to windows and in nginx i used something like this to solve the problem:

location ~* ^.+.(jpg|jpeg|gif|png|ico|css|tgz|gz|rar|zip|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|ttf)$ {
    access_log off;
    expires max;
}
share|improve this question

1 Answer 1

I have never come across one. Can you not filter in your log viewer of choice?

Remember that a request for /css/main.css does not have to return a file called main.css in the css folder on the file system.

A more obvious example is a request for /images/thumb/products/1123.jpg the file does not exist and the pipeline dynamically produces the thumbnail image on request.

share|improve this answer
    
The main problem is the performance. I've a bigger site with about 30-40 images, js- and css files per page. I have no dynamic generated css/js files or images, so I want to disable logging here to avoid wasting IO and storage. –  user3276634 Mar 28 at 17:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.