diff --git a/conf/nginx.conf b/conf/nginx.conf index f7ddb6d..041e751 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,6 +2,10 @@ ## Do not edit this file. It will be replaced each time ## Mail-in-a-Box needs up update the web configuration. +upstream php-fpm { + server unix:/var/run/php5-fpm.sock; +} + # Redirect all HTTP to HTTPS. server { listen 80; @@ -69,7 +73,7 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$1; fastcgi_param PATH_INFO $2; fastcgi_param HTTPS on; - fastcgi_pass unix:/tmp/php-fastcgi.www-data.sock; + fastcgi_pass php-fpm; } # Optional: set long EXPIRES header on static assets @@ -84,21 +88,22 @@ server { location = /.well-known/webfinger { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/bin/mailinabox-webfinger.php; - fastcgi_pass unix:/tmp/php-fastcgi.www-data.sock; + fastcgi_pass php-fpm; } # Microsoft Exchange autodiscover.xml for email location /autodiscover/autodiscover.xml { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/bin/mailinabox-exchange-autodiscover.php; - fastcgi_pass unix:/tmp/php-fastcgi.www-data.sock; + fastcgi_pass php-fpm; } # Z-Push (Microsoft Exchange ActiveSync) location /Microsoft-Server-ActiveSync { - include /etc/nginx/fastcgi_params; + include /etc/nginx/fastcgi_params; + fastcgi_param PHP_VALUE "include_path=/usr/share/awl/inc"; fastcgi_param SCRIPT_FILENAME /usr/local/lib/z-push/index.php; - fastcgi_pass unix:/tmp/php-fastcgi.www-data.sock; + fastcgi_pass php-fpm; } # ADDITIONAL DIRECTIVES HERE