The solution is to modify this
try_files $uri $uri/ /index.php?$query_string;
with this
try_files $uri $uri/ /app.php?$query_string;
in /etc/nginx/sites-enabled/php.app