mirror of
https://github.com/YunoHost-Apps/radicale_ynh.git
synced 2024-09-03 20:16:14 +02:00
Fix nginx
This commit is contained in:
parent
4c59c7d031
commit
42feaa701b
3 changed files with 28 additions and 26 deletions
|
@ -25,23 +25,23 @@ location @radicale {
|
||||||
uwsgi_param SERVER_NAME $server_name;
|
uwsgi_param SERVER_NAME $server_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
#INFCLOUD#location __PATH__/infcloud {
|
__INF_CLOUD__location __PATH__/infcloud {
|
||||||
#INFCLOUD# alias __FINALPATH__/infcloud;
|
__INF_CLOUD__ alias __FINALPATH__/infcloud;
|
||||||
#INFCLOUD# if ($scheme = http) {
|
__INF_CLOUD__ if ($scheme = http) {
|
||||||
#INFCLOUD# rewrite ^ https://$server_name$request_uri? permanent;
|
__INF_CLOUD__ rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
#INFCLOUD# }
|
__INF_CLOUD__ }
|
||||||
#INFCLOUD# index index.html index.php ;
|
__INF_CLOUD__ index index.html index.php ;
|
||||||
#INFCLOUD# try_files $uri $uri/ index.php;
|
__INF_CLOUD__ try_files $uri $uri/ index.php;
|
||||||
#INFCLOUD# location ~ [^/]\.php(/|$) {
|
__INF_CLOUD__ location ~ [^/]\.php(/|$) {
|
||||||
#INFCLOUD# fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
__INF_CLOUD__ fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
#INFCLOUD# fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
__INF_CLOUD__ fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
#INFCLOUD# fastcgi_index index.php;
|
__INF_CLOUD__ fastcgi_index index.php;
|
||||||
#INFCLOUD# include fastcgi_params;
|
__INF_CLOUD__ include fastcgi_params;
|
||||||
#INFCLOUD# fastcgi_param REMOTE_USER $remote_user;
|
__INF_CLOUD__ fastcgi_param REMOTE_USER $remote_user;
|
||||||
#INFCLOUD# fastcgi_param PATH_INFO $fastcgi_path_info;
|
__INF_CLOUD__ fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
#INFCLOUD# fastcgi_param SCRIPT_FILENAME $request_filename;
|
__INF_CLOUD__ fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
#INFCLOUD# }
|
__INF_CLOUD__ }
|
||||||
#INFCLOUD#
|
__INF_CLOUD__
|
||||||
#INFCLOUD# # Include SSOWAT user panel.
|
__INF_CLOUD__ # Include SSOWAT user panel.
|
||||||
#INFCLOUD# include conf.d/yunohost_panel.conf.inc;
|
__INF_CLOUD__ include conf.d/yunohost_panel.conf.inc;
|
||||||
#INFCLOUD#}
|
__INF_CLOUD__}
|
||||||
|
|
|
@ -75,13 +75,14 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configure NGINX" --weight=2
|
ynh_script_progression --message="Configure NGINX" --weight=2
|
||||||
|
|
||||||
ynh_add_nginx_config
|
|
||||||
if [ $infcloud -eq 1 ]
|
if [ $infcloud -eq 1 ]
|
||||||
then
|
then
|
||||||
# Add InfCloud in NGINX config
|
# Add InfCloud in NGINX config
|
||||||
ynh_replace_string "#INFCLOUD#" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
$inf_cloud=""
|
||||||
|
else
|
||||||
|
$inf_cloud="#INFCLOUD#"
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "$finalnginxconf"
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
|
|
@ -159,13 +159,14 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
if [ $overwrite_nginx -eq 1 ]
|
if [ $overwrite_nginx -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Reconfigure nginx" --weight=2
|
ynh_script_progression --message="Reconfigure nginx" --weight=2
|
||||||
ynh_add_nginx_config
|
|
||||||
if [ $infcloud -eq 1 ]
|
if [ $infcloud -eq 1 ]
|
||||||
then
|
then
|
||||||
# Add InfCloud in NGINX config
|
# Add InfCloud in NGINX config
|
||||||
ynh_replace_string "#INFCLOUD#" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
$inf_cloud=""
|
||||||
|
else
|
||||||
|
$inf_cloud="#INFCLOUD#"
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "$finalnginxconf"
|
ynh_add_nginx_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue