From 80fc38d57b356cd31f5cc78dc97dc6b4f0800c4b Mon Sep 17 00:00:00 2001 From: polytan02 Date: Mon, 13 Apr 2015 15:39:55 +0100 Subject: [PATCH] Update of nginx.conf --- conf/nginx.conf | 35 +++++++++++++++++++---------------- scripts/install | 1 + 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1d8f87b..c7d5d44 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,20 +1,23 @@ location PATHTOCHANGE { - alias ALIASTOCHANGE; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php index.html index.htm; - default_type text/html; - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - } + alias ALIASTOCHANGE; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + + client_max_body_size 10G; + index index.php; + try_files $uri $uri/ index.php; + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; + } + + include conf.d/yunohost_panel.conf.inc; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; } diff --git a/scripts/install b/scripts/install index 94c1ce1..359ed6c 100644 --- a/scripts/install +++ b/scripts/install @@ -51,6 +51,7 @@ sudo chown -hR www-data:www-data $final_path # Modify Nginx configuration file and copy it to Nginx conf directory sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf +sed -i "s@NAMETOCHANGE@$domain\_$sitename@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$sitename.conf sed -i "s@NAMETOCHANGE@$domain\_$sitename@g" ../conf/php-fpm.conf