mirror of
https://github.com/YunoHost-Apps/yellow_ynh.git
synced 2024-09-03 20:36:12 +02:00
Add extensions
This commit is contained in:
parent
14082f24a3
commit
20e99c8df8
8 changed files with 19 additions and 26 deletions
|
@ -1,14 +1,14 @@
|
|||
location __PATH__/cache {
|
||||
rewrite ^(.*)$ /error break;
|
||||
}
|
||||
}
|
||||
|
||||
location __PATH__/content {
|
||||
rewrite ^(.*)$ /error break;
|
||||
}
|
||||
}
|
||||
|
||||
location __PATH__/system {
|
||||
rewrite ^(.*)$ /error break;
|
||||
}
|
||||
}
|
||||
|
||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
@ -20,8 +20,7 @@ location __PATH__/ {
|
|||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.html yellow.php;
|
||||
|
||||
index yellow.php;
|
||||
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^(.*)$ /yellow.php last;
|
||||
|
@ -29,11 +28,16 @@ location __PATH__/ {
|
|||
}
|
||||
|
||||
try_files $uri $uri/ yellow.php;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
fastcgi_index yellow.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
|
|
@ -69,19 +69,19 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
|||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
# Change the path in the nginx config file
|
||||
# Change the path in the NGINX config file
|
||||
if [ $change_path -eq 1 ]
|
||||
then
|
||||
# Make a backup of the original nginx config file if modified
|
||||
# Make a backup of the original NGINX config file if modified
|
||||
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
||||
# Set global variables for nginx helper
|
||||
# Set global variables for NGINX helper
|
||||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
||||
# Change the domain for nginx
|
||||
# Change the domain for NGINX
|
||||
if [ $change_domain -eq 1 ]
|
||||
then
|
||||
# Delete file checksum for the old conf file location
|
||||
|
|
|
@ -72,15 +72,10 @@ chmod -R a+rw $final_path
|
|||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log"
|
||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -107,13 +108,6 @@ ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependenc
|
|||
chown -R $app: $final_path
|
||||
chmod -R a+rw $final_path
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
||||
|
||||
yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
|
BIN
sources/french.zip
Normal file
BIN
sources/french.zip
Normal file
Binary file not shown.
BIN
sources/gallery.zip
Normal file
BIN
sources/gallery.zip
Normal file
Binary file not shown.
BIN
sources/highlight.zip
Normal file
BIN
sources/highlight.zip
Normal file
Binary file not shown.
BIN
sources/markdown.zip
Normal file
BIN
sources/markdown.zip
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue