配置Nginx以隐藏index.php并重定向到

Is possible to do this same code (Apache .htaccess) on Nginx Server?

<IfModule mod_rewrite.c>
    RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

The most important for me in this case, is preservs a $_SERVER['QUERY_STRING'] with all contents after a localhost/root/$query_string

I'm developing a framework PHP using HHVM, the only thing that I want is hide a "index.php" or "index.hh", without redirect to 404 Nginx or load a index.php/index.php inside my nginx's root projects folders

Have you tried using try_files?

location / {
    try_files $uri $uri/ /index.php?$args
} 

Then, configure your index.php to catch your query string with $_SERVER['QUERY_STRING'] as stated above.

Check out the WordPress nginx configuration for an example: https://codex.wordpress.org/Nginx