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:
parent
73b1e9e07b
commit
284e277055
3 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue