error_log logs/error.log debug;

events {
    worker_connections  1024;
}

http {
    default_type  text/plain;

    geo $foo {
        255.255.255.255 0;
        default 1;
    }

    geo $remote_addr $bar {
        255.255.255.255 0;
        default 1;
    }

    server {
        listen       unix:/tmp/ngx.sock;
        server_name  localhost;

        location = /foo {
            return 200 "$foo";
        }

        location = /bar {
            return 200 "$bar";
        }
    }
}