[My_Webapp] aide rewrite URL quand erreur de page

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 11.3.0.2
What app is this about: My_WebAPP

Describe your issue

Hello everyone.
I’ve got a issue
I can’t redirect to the index.php of my site hosted in arborecsence
/var/www/my_webapp/www/index.html when someone makes a typo error in the URL.
It systematically redirects to the yunohost autentificaiton page.
I tried to add to the inthe my_webapp.conf nginx conf :

/etc/nginx/conf.d/mydomain-B.d/my_webapp.conf

"error_page 404 /index.php;"

But it does’nt change anything.
Have you an idea ?
Thx a lot.

Share relevant logs or error messages

i don’t find any log for this subject in
/var/log/nginx/*

403 and 404 error handling
The web server configuration supports http error handling 403 and 404 (access denied and resource not found). Create an error folder at INSTALL_DIR/www/error, and put your 403.html and 404.html files in there

thnak’s for this quick response.
image

but not working :confused:

How did you transfer the files? They seem to have wrong permissions. my_webapp:www-data
And did you try reloading nginx?

huuuum i have update the packet to the last version.
I add /etc/nginx/conf.d/mydomaine.fr.d/my_webapp.d/error-code.conf

and this

Build error access

error_page 403 /chocolatine/error/403.html;
error_page 404 /chocolatine/error/404.html;

location ^~ /chocolatine/error/ {
internal;
}

and now it’s ok !
thank’s

yeah… i was in a ooooooold version of my_webapp ( afraid to update the packet and lost the DB password)
and in this version, rights/owners in /my_webapp was my_webapp:my_webapp and not my_webapp:www-appdata

anyway, it’s ok !
thanks everyone

sudo cat /etc/yunohost/apps/my_webapp/settings.yml

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.