Nginx configuration and issue redirections on Garradin

Hello,
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 : https://github.com/YunoHost-Apps/garradin_ynh/issues/24
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:

https://github.com/YunoHost-Apps/garradin_ynh/blob/testing/conf/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 :
https://github.com/ericgaspar/garradin_ynh/blob/NGINX/conf/nginx.conf

2 Likes

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 !