server {
    listen	 *:81;
    server_name  IPSERVER;
	
	index  nomoney.html;
	
	if ( $http_user_agent ~ uTorrent ) { return 404; }
	if ( $http_user_agent ~ Downloader ) { return 404; }
	if ( $http_user_agent ~ ContentDefender ) { return 404; }
	if ( $http_user_agent ~ avast ) { return 404; }
	if ( $http_user_agent ~ Windows-Update-Agent ) { return 404; }
	if ( $http_user_agent ~ "Microsoft NCSI" ) { return 404; }
	if ( $http_user_agent ~ "ESS Update" ) { return 404; }
	if ( $http_user_agent ~ "Google Update" ) { return 404; }
	if ( $http_user_agent ~ "Microsoft-CryptoAPI" ) { return 404; }
	if ( $http_user_agent ~ "Microsoft BITS" ) { return 404; }
	if ( $http_user_agent ~ MSDW ) { return 404; }
	if ( $http_user_agent ~ SeaPort ) { return 404; }
	if ( $http_user_agent ~ Windows-Media-Player ) { return 404; }
	if ( $http_user_agent ~ "Google Update" ) { return 404; }
	if ( $http_user_agent ~ GoogleEarth ) { return 404; }
	if ( $http_user_agent ~ Skype ) { return 404; }
	if ( $http_user_agent ~ MailRuSputnik ) { return 404; }
	if ( $http_user_agent ~ ^Ya\.Online ) { return 404; }
	if ( $http_user_agent ~ MRA ) { return 404; }
	if ( $http_user_agent ~* MediaGet ) { return 404; }
	if ( $http_user_agent ~ BTWebClient ) { return 404; }
	if ( $http_user_agent ~ Syncer ) { return 404; }
	if ( $http_user_agent ~ TMUFE ) { return 404; }
	if ( $http_user_agent ~ Akamai\ NetSession\ Interface ) { return 404; }
	if ( $http_user_agent ~ VKSaver ) { return 404; }
	if ( $http_user_agent ~ DrWebUpdate ) { return 404; }
	if ( $http_user_agent = "" ) { return 404; }
	if ( $host ~ geo\.kaspersky\.com ) { return 404; }
	if ( $host ~ (su|download|webrep).*\.avast\.com ) { return 404; }
	if ( $host = wi2geo.mobile.yandex.net ) { return 404; }
	if ( $host ~ bar.*\.yandex\.ru ) { return 404; }
	if ( $host ~ (ping|master)\d*\.(dyngate|teamviewer)\.com ) { return 404; }
	if ( $host ~ sitecheck\d*\.opera\.com ) { return 404; }
	if ( $host ~ (xml\.my|mailsputnik|maps)\.mail\.ru ) { return 404; }
	if ( $host = onlineconfigservice.ubi.com ) { return 404; }
	if ( $host = com-services.pandonetworks.com ) { return 404; }
	if ( $host ~ ticno\.com ) { return 404; }
	if ( $host ~ conduit ) { return 404; }
	if ( $host ~ cbox\.ws ) { return 404; }
	if ( $host ~ (pricelist|metrics)\.skype\.com ) { return 404; }
	if ( $host = weather.service.msn.com ) { return 404; }
	if ( $host = advstat.letitbit.net ) { return 404; }
	if ( $host = skymonk.net ) { return 404; }
	if ( $host ~ counter ) { return 404; }
	if ( $host ~ pluraserver ) { return 404; }
	if ( $host ~ apps.bittorrent.com ) { return 404; }
	if ( $host ~ tracker ) { return 404; }
	if ( $request_uri ~* (update|feed|announce|rss|xml|json|oauth|7z|tar|zip|gz) ) { return 404; }
	if ( $request_uri ~* (toolbar|suggest) ) { return 404; }
	if ( $request_filename ~ \.(ico|xml|swf|flv|7z|tar|zip|gz|crl|txt|cab|msi|jar) ) { return 404; }
	if ( $host ~ norton ) { return 404; }
	if ( $http_user_agent = "_" ) { return 404; }
	
    location / {
        root   {{ OS.mikbill.dirs.www }}/blocked;
        index  nomoney.html;
    }

    error_page 500 502 503 504 404 403 /nomoney.html;

	location /nomoney.html {
        root   {{ OS.mikbill.dirs.www }}/blocked;
    }
}
