I separated different WordPress installation under the same domain name, but I need each of them have it own rewrite rules. So here is my solution to achieve it.
// xxx.com/cmf/wordpress wordpress rewrite rules conf
location /cmf/wordpress/ {
index index.php;
try_files $uri $uri/ /cmf/wordpress/index.php?$args;
}