Nginx configuration and issue redirections on Garradin

I try maintain the Garradin_ynh app.
Since an upgrade version for Garradin_ynh, there is an issue with the links created on the public page. It must be a problem with the nginx.conf but I haven’t found what’s going wrong.
This issue is explain here :
The links works for the wiki when they are private, it is possible to edit other public pages in the wiki, but the links don’t works…
After discussion with the maintainer of Garradin, it seems that the urls must be found in /var/www/garradin/www/_route.php. I have try to add these lines on the config:

index index.php index.html;
try_files $uri $uri/ /_route.php;

But it did not resolve the matter… and I am not an expert.

Does somebody can help me resolve this issue ?
I am working in the testing branch of this app, here is the link to the file nginx.conf:

I have seen a suggestion to add this in the nginx.conf:

index index.php index.html;
try_files $uri $uri/ /_route.php?$query_args;

But, it did not work, I tried on local machine, it brokes nginx…

I think you need to add __PATH__

Really-quick-non-tested-trial :


Yes ! You found it @ericg ! I have tested, and it works ! thank you so much ! <3

Do you think I can merge the Pull Request #27 ? I think it is possible… Just a detail, as it is write with php7.3, perhaps it is not a good idea if some users are still using a old Yunohost with Debian Stretch ?
I have try with jenkins, it seems all right:

Ok, I have finally pushed the PR. I hope this will resolve the issues… I think so !

since the new releases of Garradin v1.0.* we have adopted @ericg suggestion to resolve the URLs added in the public site, and it works !
But, I have not realize the mistakes with URLs when you add a new accounting entry, this issue is now open: url path issue when saving new accounting entry · Issue #37 · YunoHost-Apps/garradin_ynh · GitHub
I am sure it is a line or parameter to fix in the nginx.conf but it is hard for me to found…
Also, I suggest to use the branch subpath_correction on the source project ti try debug this issue…