diff --git a/conf/nginx.conf b/conf/nginx.conf index 742b479..c7d5d44 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,22 +1,23 @@ location PATHTOCHANGE { alias ALIASTOCHANGE; - if ($scheme = http) { + + 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-rainloop.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; } -# location ^~ /data { -# deny all; -# } + + 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; + } diff --git a/scripts/install b/scripts/install index 17ce2d6..044d22a 100644 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,7 @@ sudo chown -R 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@$app@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf diff --git a/scripts/upgrade b/scripts/upgrade index 5ad7ed6..3a64c50 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,6 +26,7 @@ sudo chown -R www-data:www-data /var/www/$app # 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@$app@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf