1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my_webapp_ynh.git synced 2024-09-03 19:46:26 +02:00

Try to setup the error code upgrade

This commit is contained in:
--help 2023-08-13 09:39:48 +02:00
parent 140562326e
commit 8b30a536cb
3 changed files with 13 additions and 2 deletions

View file

@ -21,7 +21,7 @@ name = "My Webapp configuration"
[main.error]
name = "Html Custom error"
[main.error.setting]
[main.error.errorfile]
ask = "HTML Path"
type = "string"
default = "/404.html"

View file

@ -5,7 +5,7 @@ name = "My Webapp"
description.en = "Custom Web app with SFTP access to serve static (HTML, CSS, JS) and PHP files"
description.fr = "Application Web personnalisée avec accès SFTP pour servir des fichiers statiques (HTML, CSS, JS) et PHP"
version = "1.0~ynh16"
version = "1.0~ynh17"
maintainers = []
@ -58,6 +58,12 @@ ram.runtime = "50M"
type = "boolean"
default = false
[install.errorfile]
ask.en = "Define a path about the 404 error page"
ask.fr = "Definir un chemin pour la page d'erreur 404"
type = "path"
default = "/404.html"
[resources]
[resources.system_user]

View file

@ -90,6 +90,11 @@ then
YNH_PHP_VERSION="$phpversion"
fi
if [ $errorfile ]
then
echo add the error config
fi
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_add_config --template="example-custom-nginx-config.conf" --destination="$nginx_extra_conf_dir/sample.conf"