diff --git a/conf/nginx.conf b/conf/nginx.conf index 5dfda08..353ec80 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,7 +8,7 @@ location /Microsoft-Server-ActiveSync { rewrite ^(.*)$ /Microsoft-Server-ActiveSync/index.php last; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param HTTPS on; diff --git a/scripts/install b/scripts/install index 58ede17..99c516f 100644 --- a/scripts/install +++ b/scripts/install @@ -64,10 +64,11 @@ sudo ln -s /usr/share/awl/inc/XML* /var/www/z-push/include/ # Modify Nginx configuration file and copy it to Nginx conf directory sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf +sudo sed -i "s@NAMETOCHANGE@$app@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/z-push.conf # Dedicated php-fpm processes -sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf +sudo sed -i "s@NAMETOCHANGE@$app@g" ../conf/php-fpm.conf finalphpconf=/etc/php5/fpm/pool.d/$app.conf sudo cp ../conf/php-fpm.conf $finalphpconf sudo chown root: $finalphpconf diff --git a/scripts/upgrade b/scripts/upgrade index 007ba19..3b3cd2d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,6 +3,7 @@ # Retrieve arguments domain=$(sudo yunohost app setting z-push domain) path="/Microsoft-Server-ActiveSync" +app=z-push # Prereqs sudo apt-get install php-soap php5-imap libawl-php php5-xsl @@ -58,6 +59,7 @@ sudo chown -R www-data: $final_path # Modify Nginx configuration file and copy it to Nginx conf directory sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf +sudo sed -i "s@NAMETOCHANGE@$app@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/z-push.conf # Dedicated php-fpm processes