From 3b56496cfb2ca0331dd046be72456ae2512429ad Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 10 Jul 2017 19:51:11 +0100 Subject: [PATCH] Add php timeout to nginx --- src/freedombone-app-dokuwiki | 2 ++ src/freedombone-app-friendica | 2 ++ src/freedombone-app-gnusocial | 2 ++ src/freedombone-app-htmly | 2 ++ src/freedombone-app-hubzilla | 2 ++ src/freedombone-app-koel | 2 ++ src/freedombone-app-lychee | 2 ++ src/freedombone-app-mediagoblin | 2 ++ src/freedombone-app-movim | 2 ++ src/freedombone-app-nextcloud | 2 ++ src/freedombone-app-postactiv | 2 ++ src/freedombone-app-rss | 2 ++ 12 files changed, 24 insertions(+) diff --git a/src/freedombone-app-dokuwiki b/src/freedombone-app-dokuwiki index 8b6843a4..2a1f7772 100755 --- a/src/freedombone-app-dokuwiki +++ b/src/freedombone-app-dokuwiki @@ -454,6 +454,7 @@ function install_dokuwiki { echo ' # fastcgi_pass 127.0.0.1:9000;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' # With php-fpm:' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME @@ -532,6 +533,7 @@ function install_dokuwiki { echo ' # fastcgi_pass 127.0.0.1:9000;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' # With php-fpm:' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME diff --git a/src/freedombone-app-friendica b/src/freedombone-app-friendica index f67ff65b..7d9b33bd 100755 --- a/src/freedombone-app-friendica +++ b/src/freedombone-app-friendica @@ -462,6 +462,7 @@ function install_friendica { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_read_timeout 300;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME @@ -530,6 +531,7 @@ function install_friendica { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME echo ' fastcgi_read_timeout 300;' >> /etc/nginx/sites-available/$FRIENDICA_DOMAIN_NAME diff --git a/src/freedombone-app-gnusocial b/src/freedombone-app-gnusocial index aa9ce081..f8dfe7ba 100755 --- a/src/freedombone-app-gnusocial +++ b/src/freedombone-app-gnusocial @@ -686,6 +686,7 @@ function install_gnusocial_main { echo ' location ~ \.php {' >> $gnusocial_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $gnusocial_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $gnusocial_nginx_site + echo ' fastcgi_read_timeout 30;' >> $gnusocial_nginx_site echo ' }' >> $gnusocial_nginx_site echo '' >> $gnusocial_nginx_site echo ' # Location' >> $gnusocial_nginx_site @@ -734,6 +735,7 @@ function install_gnusocial_main { echo ' location ~ \.php {' >> $gnusocial_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $gnusocial_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $gnusocial_nginx_site + echo ' fastcgi_read_timeout 30;' >> $gnusocial_nginx_site echo ' }' >> $gnusocial_nginx_site echo '' >> $gnusocial_nginx_site echo ' # Location' >> $gnusocial_nginx_site diff --git a/src/freedombone-app-htmly b/src/freedombone-app-htmly index 2436828a..36ba5b4f 100755 --- a/src/freedombone-app-htmly +++ b/src/freedombone-app-htmly @@ -480,6 +480,7 @@ function install_htmly_website { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME @@ -559,6 +560,7 @@ function install_htmly_website_onion { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$HTMLY_DOMAIN_NAME diff --git a/src/freedombone-app-hubzilla b/src/freedombone-app-hubzilla index 9ccc8a8b..72925f93 100755 --- a/src/freedombone-app-hubzilla +++ b/src/freedombone-app-hubzilla @@ -466,6 +466,7 @@ function install_hubzilla { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_read_timeout 300;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME @@ -534,6 +535,7 @@ function install_hubzilla { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_index index.php;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME echo ' fastcgi_read_timeout 300;' >> /etc/nginx/sites-available/$HUBZILLA_DOMAIN_NAME diff --git a/src/freedombone-app-koel b/src/freedombone-app-koel index 92b23d43..296281b7 100755 --- a/src/freedombone-app-koel +++ b/src/freedombone-app-koel @@ -585,6 +585,7 @@ function install_koel_main { echo ' location ~ \.php {' >> $koel_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $koel_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $koel_nginx_site + echo ' fastcgi_read_timeout 30;' >> $koel_nginx_site echo ' }' >> $koel_nginx_site echo '' >> $koel_nginx_site echo ' # Location' >> $koel_nginx_site @@ -643,6 +644,7 @@ function install_koel_main { echo ' location ~ \.php {' >> $koel_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $koel_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $koel_nginx_site + echo ' fastcgi_read_timeout 30;' >> $koel_nginx_site echo ' }' >> $koel_nginx_site echo '' >> $koel_nginx_site echo ' # Location' >> $koel_nginx_site diff --git a/src/freedombone-app-lychee b/src/freedombone-app-lychee index c175dc07..87474bc6 100755 --- a/src/freedombone-app-lychee +++ b/src/freedombone-app-lychee @@ -279,6 +279,7 @@ function install_lychee_website { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' fastcgi_index index.html;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME @@ -348,6 +349,7 @@ function install_lychee_website_onion { echo ' # With php-fpm:' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' include fastcgi_params;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' fastcgi_index index.html;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$LYCHEE_DOMAIN_NAME diff --git a/src/freedombone-app-mediagoblin b/src/freedombone-app-mediagoblin index 74925cf9..54eb6528 100755 --- a/src/freedombone-app-mediagoblin +++ b/src/freedombone-app-mediagoblin @@ -402,6 +402,7 @@ function install_mediagoblin { echo ' include /etc/nginx/fastcgi_params;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' fastcgi_param PATH_INFO $fastcgi_script_name;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' fastcgi_param SCRIPT_NAME "";' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo '}' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME else @@ -458,6 +459,7 @@ function install_mediagoblin { echo ' include /etc/nginx/fastcgi_params;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' fastcgi_param PATH_INFO $fastcgi_script_name;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' fastcgi_param SCRIPT_NAME "";' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo '}' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME diff --git a/src/freedombone-app-movim b/src/freedombone-app-movim index bfac73c1..6cfa3cf7 100755 --- a/src/freedombone-app-movim +++ b/src/freedombone-app-movim @@ -470,6 +470,7 @@ function install_movim { echo ' location ~ \.php {' >> $movim_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $movim_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $movim_nginx_site + echo ' fastcgi_read_timeout 30;' >> $movim_nginx_site echo ' }' >> $movim_nginx_site echo '' >> $movim_nginx_site echo ' # Location' >> $movim_nginx_site @@ -529,6 +530,7 @@ function install_movim { echo ' location ~ \.php {' >> $movim_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $movim_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $movim_nginx_site + echo ' fastcgi_read_timeout 30;' >> $movim_nginx_site echo ' }' >> $movim_nginx_site echo '' >> $movim_nginx_site echo ' # Location' >> $movim_nginx_site diff --git a/src/freedombone-app-nextcloud b/src/freedombone-app-nextcloud index 6dd83822..aa48ffea 100755 --- a/src/freedombone-app-nextcloud +++ b/src/freedombone-app-nextcloud @@ -492,6 +492,7 @@ function install_nextcloud_main { echo ' location ~ \.php {' >> $nextcloud_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $nextcloud_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $nextcloud_nginx_site + echo ' fastcgi_read_timeout 30;' >> $nextcloud_nginx_site echo ' }' >> $nextcloud_nginx_site echo '' >> $nextcloud_nginx_site echo ' # Location' >> $nextcloud_nginx_site @@ -547,6 +548,7 @@ function install_nextcloud_main { echo ' location ~ \.php {' >> $nextcloud_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $nextcloud_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $nextcloud_nginx_site + echo ' fastcgi_read_timeout 30;' >> $nextcloud_nginx_site echo ' }' >> $nextcloud_nginx_site echo '' >> $nextcloud_nginx_site echo ' # Location' >> $nextcloud_nginx_site diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv index 8c43d48b..78d75392 100755 --- a/src/freedombone-app-postactiv +++ b/src/freedombone-app-postactiv @@ -703,6 +703,7 @@ function install_postactiv_main { echo ' location ~ \.php {' >> $postactiv_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $postactiv_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $postactiv_nginx_site + echo ' fastcgi_read_timeout 30;' >> $postactiv_nginx_site echo ' }' >> $postactiv_nginx_site echo '' >> $postactiv_nginx_site echo ' # Location' >> $postactiv_nginx_site @@ -751,6 +752,7 @@ function install_postactiv_main { echo ' location ~ \.php {' >> $postactiv_nginx_site echo ' include snippets/fastcgi-php.conf;' >> $postactiv_nginx_site echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> $postactiv_nginx_site + echo ' fastcgi_read_timeout 30;' >> $postactiv_nginx_site echo ' }' >> $postactiv_nginx_site echo '' >> $postactiv_nginx_site echo ' # Location' >> $postactiv_nginx_site diff --git a/src/freedombone-app-rss b/src/freedombone-app-rss index d95dc152..9fe2c5f7 100755 --- a/src/freedombone-app-rss +++ b/src/freedombone-app-rss @@ -389,6 +389,7 @@ function install_rss_main { echo ' location ~ \.php {' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' include snippets/fastcgi-php.conf;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo '' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' location / {' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME @@ -427,6 +428,7 @@ function install_rss_main { echo ' location ~ \.php {' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' include snippets/fastcgi-php.conf;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME + echo ' fastcgi_read_timeout 30;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo '' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME echo ' set $mobile_rewrite do_not_perform;' >> /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME