I managed to make use of community help in Yunohost forums. The configuration that works in my case is:
location / {
# Path to source
alias /var/www/my_webapp/www/;
# Default indexes and catch-all
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
# Remove index.php from URL needed on some cms
if (!-e $request_filename)
{
rewrite ^(.*)$ /index.php?q=$1 last;
}
# Prevent useless logs
location = /favicon.ico {
log_not_found off;
access_log off;
}
}