You can follow this Ajenti-V+PHP tutorial: http://support.ajenti.org/topic/353409-setting-up-a-php-website-with-ajenti-v-wordpress-example/
As for the rewrite rule, you need to add this:
location / {
try_files $uri $uri/ /index.php?$args;
}
to "Custom Configuration" of your website