From 0ce35270e3c27f597e1f858ccbce74aecd5bb42a Mon Sep 17 00:00:00 2001 From: Mafoo Date: Tue, 23 May 2017 16:30:15 +0100 Subject: [PATCH] BugFix core/upgrade/install.php timeout (#98) update configuration to allow the core/upgrade/install.php to have the same read_timeout in nginx as it has in php execution time. This should prevent the nginx timeout error when a upgrade takes longer than 60 seconds (the deafult in nginx) --- centos/resources/nginx/fusionpbx | 30 +++++++++++++++++++++++++++ debian/resources/nginx/fusionpbx | 30 +++++++++++++++++++++++++++ devuan/resources/nginx/fusionpbx | 30 +++++++++++++++++++++++++++ freebsd/resources/fusionpbx/fusionpbx | 30 +++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) diff --git a/centos/resources/nginx/fusionpbx b/centos/resources/nginx/fusionpbx index 11d0f18..3fc3b56 100755 --- a/centos/resources/nginx/fusionpbx +++ b/centos/resources/nginx/fusionpbx @@ -21,6 +21,16 @@ server{ fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; @@ -102,6 +112,16 @@ server { fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; @@ -183,6 +203,16 @@ server { fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; diff --git a/debian/resources/nginx/fusionpbx b/debian/resources/nginx/fusionpbx index 6218dd4..097e29d 100755 --- a/debian/resources/nginx/fusionpbx +++ b/debian/resources/nginx/fusionpbx @@ -21,6 +21,16 @@ server{ fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; @@ -102,6 +112,16 @@ server { fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; @@ -188,6 +208,16 @@ server { fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; diff --git a/devuan/resources/nginx/fusionpbx b/devuan/resources/nginx/fusionpbx index 6218dd4..23ea29a 100755 --- a/devuan/resources/nginx/fusionpbx +++ b/devuan/resources/nginx/fusionpbx @@ -21,6 +21,16 @@ server{ fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; @@ -102,6 +112,16 @@ server { fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; @@ -180,6 +200,16 @@ server { index index.php; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + location ~ \.php$ { fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; #fastcgi_pass 127.0.0.1:9000; diff --git a/freebsd/resources/fusionpbx/fusionpbx b/freebsd/resources/fusionpbx/fusionpbx index 6218dd4..d533638 100755 --- a/freebsd/resources/fusionpbx/fusionpbx +++ b/freebsd/resources/fusionpbx/fusionpbx @@ -21,6 +21,16 @@ server{ fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all; @@ -94,6 +104,16 @@ server { index index.php; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + location ~ \.php$ { fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; #fastcgi_pass 127.0.0.1:9000; @@ -188,6 +208,16 @@ server { fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; } + # Allow the upgrade routines to run longer than normal + location = /core/upgrade/index.php { + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; + fastcgi_read_timeout 15m; + } + # Disable viewing .htaccess & .htpassword & .db location ~ .htaccess { deny all;