OK, I've figured out how to do it.
I assume, that my upstream pool is called 'webservers' which consist two servers with IP 192.168.1.2 and 192.168.1.3. Now in configuration file for specific website you can use following configuration:
location / {
proxy_pass_header $server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if ( $remote_addr = "MyIP" ) {
proxy_pass http://192.168.1.2:80;
}
if ( $remote_addr != "MyIP" ) {
proxy_pass http://192.168.1.3:80;
}
}
Where 'MyIP' is an IP address of the PC, from which would you like to perform testing.
Hope, that this will be useful for others.