Lots of folks seem to have difficulty with converting apache mod_rewrite rules to nginx format.
If you are trying to get the Urli URL shortener working under nginx, the following singular rewrite rule should work, provided you have not installed it under a subdirectory:
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?$1 last ;
break ;
}
Unless you explicitly comment out or modify the logic in check_htaccess() in application/libraries/urli.php, you will also need to ensure a dummy (or real, in the event you need to quickly switch back to apache) .htaccess file exists at the root directory as well.