mirror of
https://github.com/YunoHost-Apps/shaarli_ynh.git
synced 2024-09-03 20:26:10 +02:00
Fix NGINX
This commit is contained in:
parent
837c3942e7
commit
a5a5ea5e64
3 changed files with 23 additions and 9 deletions
|
@ -9,18 +9,18 @@ location __PATH__/ {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
index index.html index.php;
|
index index.php;
|
||||||
|
|
||||||
try_files $uri $uri/ /index.php?q=$uri&$args;
|
try_files $uri $uri/ __PATH_HACK__/index.php$is_args$args;
|
||||||
|
|
||||||
location ~ [^/]\.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_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
|
fastcgi_index index.php;
|
||||||
fastcgi_index index.php;
|
include fastcgi_params;
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
include fastcgi_params;
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
|
|
|
@ -70,6 +70,13 @@ ynh_setup_source --dest_dir="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring NGINX web server..."
|
ynh_script_progression --message="Configuring NGINX web server..."
|
||||||
|
|
||||||
|
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
|
||||||
|
if [ $path_url = "/" ]; then
|
||||||
|
ynh_replace_string "__PATH_HACK__" "" "../conf/nginx.conf"
|
||||||
|
else
|
||||||
|
ynh_replace_string "__PATH_HACK__" "$path_url/$path_url" "../conf/nginx.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,13 @@ ynh_secure_remove "$tmpdir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||||
|
|
||||||
|
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
|
||||||
|
if [ $path_url = "/" ]; then
|
||||||
|
ynh_replace_string "__PATH_HACK__" "" "../conf/nginx.conf"
|
||||||
|
else
|
||||||
|
ynh_replace_string "__PATH_HACK__" "$path_url/$path_url" "../conf/nginx.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue