Im getting crazy to make those lines from htaccess of apache2 to nginx rewrite, searched a lot in google, but nothing works, Im looking for someone who has a nice heart to help me with this lines :

RewriteRule ^api$ api.php [L]
RewriteRule ^admin/(.*) admin/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

Thanks a lot!