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.

Is there a way to tell NGINX NOT to generate certain information into access log?

I have Cometchat installed and polls every x miliseconds, and this is OK, but how can I skip those calls be written in access log?

Here's a sample:

83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /images/sidebarTitle.png HTTP/1.1" 200 405 "http://www.fictioncity.net/css/fictioncity.css" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /usermedia/0/3/thumb/3/15fd587c25469a8e9c285dba1711b8eeedf8c68b93bd33ba5e0b8daaff565162.jpg HTTP/1.1" 200 4369 "http://www.fictioncity.net/whatsup?l=es" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /images/fc-ny/banner-FC-NY.jpg HTTP/1.1" 200 98571 "http://www.fictioncity.net/whatsup?l=es" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /css/jqueryui/fc/images/ui-bg_flat_75_ffffff_40x100.png HTTP/1.1" 304 0 "http://www.fictioncity.net/css/jqueryui/fc/jquery-ui.css" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /cometchat/themes/default/images/bgrepeat.png HTTP/1.1" 304 0 "http://www.fictioncity.net/cometchat/cometchatcss.php" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /cometchat/themes/default/images/hide.png HTTP/1.1" 304 0 "http://www.fictioncity.net/cometchat/cometchatcss.php" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /cometchat/themes/default/images/cometchat.png HTTP/1.1" 304 0 "http://www.fictioncity.net/cometchat/cometchatcss.php" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:51 +0000] "GET /images/avatar_female_p.png HTTP/1.1" 200 15010 "http://www.fictioncity.net/whatsup?l=es" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
83.57.184.215 - - [10/Mar/2011:20:51:52 +0000] "POST /cometchat/cometchat_receive.php HTTP/1.1" 200 22 "http://www.fictioncity.net/whatsup?l=es" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
200.55.213.162 - - [10/Mar/2011:20:51:52 +0000] "POST /cometchat/cometchat_receive.php HTTP/1.1" 200 22 "http://fictioncity.net/image/show?image=3431&key=dcd12f7d55b1448db788ac8e76d508b7&l=es" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13"
83.57.184.215 - - [10/Mar/2011:20:51:56 +0000] "POST /cometchat/cometchat_receive.php HTTP/1.1" 200 22 "http://www.fictioncity.net/whatsup?l=es" "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
186.109.23.106 - - [10/Mar/2011:20:51:56 +0000] "POST /cometchat/cometchat_receive.php HTTP/1.1" 200 22 "http://www.fictioncity.net/whatsup?l=es" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.127 Safari/534.16"
200.123.146.83 - - [10/Mar/2011:20:51:57 +0000] "POST /cometchat/cometchat_receive.php HTTP/1.1" 200 22 "http://www.fictioncity.net/site/mainpage?view=itau" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.16pre) Gecko/20110308 Ubuntu/10.10 (maverick) Namoroka/3.6.16pre"
200.117.89.165 - - [10/Mar/2011:20:51:58 +0000] "POST /cometchat/cometchat_receive.php HTTP/1.1" 200 22 "http://www.fictioncity.net/resume/edit?l=es" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13"
share|improve this question
add comment

1 Answer 1

use separate sub-rule:

location ~* /cometchat/ {
  access_log off;
}
share|improve this answer
    
You most likely don't need a regex location, but otherwise completely correct. –  Martin Fjordvald Mar 10 '11 at 21:59
    
Well it worked, partially. I need to make /cometchat/ to be processed by Apache. I did this but it's still not working server { location / { proxy_pass http://127.0.0.1:8080/; } location /cometchat { proxy_pass http://127.0.0.1:8080/; access_log off; } –  Luis Lobo Borobia Mar 14 '11 at 16:35
add comment

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.