1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00

Tell nginx to use a dedicated php-fpm process

This commit is contained in:
polytan02 2015-08-10 14:38:47 +01:00
parent 73b1e9e07b
commit 284e277055
3 changed files with 5 additions and 2 deletions

View file

@ -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;

View file

@ -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

View file

@ -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