From 824780673a6e4cc040608d207bfaf2cb27d937a4 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 6 Sep 2011 10:09:46 +0000 Subject: [PATCH] Made fastcgi syntax configurable to support older apache versions. --- install/tpl/server.ini.master | 1 + .../web/admin/form/server_config.tform.php | 8 ++ .../web/admin/lib/lang/en_server_config.lng | 6 +- .../templates/server_config_fastcgi_edit.htm | 6 ++ .../web/tools/templates/user_settings.htm | 2 +- server/conf/vhost.conf.master | 73 ++++++++----------- .../plugins-available/apache2_plugin.inc.php | 1 + 7 files changed, 52 insertions(+), 45 deletions(-) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 97c59fdb41..02d08ff99a 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -70,6 +70,7 @@ fastcgi_phpini_path=/etc/php5/cgi/ fastcgi_children=8 fastcgi_max_requests=5000 fastcgi_bin=/usr/bin/php-cgi +fastcgi_config_syntax=1 [jailkit] jailkit_chroot_home=/home/[username] diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 4db9551edb..5badcade62 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -686,6 +686,14 @@ $form["tabs"]['fastcgi'] = array( 'width' => '40', 'maxlength' => '255' ), + 'fastcgi_config_syntax' => array( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '2', + 'value' => array('1' => 'Old', '2' => 'New'), + 'width' => '40', + 'maxlength' => '255' + ), ################################## # ENDE Datatable fields ################################## diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 9255188fd1..6c1e1a7723 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -7,11 +7,10 @@ $wb["ufw_default_output_policy_txt"] = 'Default Output Policy'; $wb["ufw_default_forward_policy_txt"] = 'Default Forward Policy'; $wb["ufw_default_application_policy_txt"] = 'Default Application Policy'; $wb["ufw_log_level_txt"] = 'Log Level'; - $wb["jailkit_chroot_home_txt"] = 'Jailkit chroot home'; $wb["jailkit_chroot_app_sections_txt"] = 'Jailkit chroot app sections'; $wb["jailkit_chroot_app_programs_txt"] = 'Jailkit chrooted applications'; -$wb['jailkit_chroot_cron_programs_txt'] = 'Jailkit cron chrooted applications'; +$wb["jailkit_chroot_cron_programs_txt"] = 'Jailkit cron chrooted applications'; $wb["website_path_txt"] = 'Website path'; $wb["website_symlinks_txt"] = 'Website symlinks'; $wb["website_basedir_txt"] = 'Website basedir'; @@ -86,4 +85,5 @@ $wb["check_apache_config_txt"] = 'Test apache configuration on restart'; $wb["network_config_warning_txt"] = 'The network configuration option is only available for Debian and Ubuntu Servers. Do not enable this option if your network interface is not eth0.'; $wb["CA_path_txt"] = 'CA Path'; $wb["CA_pass_txt"] = 'CA passphrase'; -?> +$wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax'; +?> \ No newline at end of file diff --git a/interface/web/admin/templates/server_config_fastcgi_edit.htm b/interface/web/admin/templates/server_config_fastcgi_edit.htm index 6e1bfea336..3ca49c5d64 100644 --- a/interface/web/admin/templates/server_config_fastcgi_edit.htm +++ b/interface/web/admin/templates/server_config_fastcgi_edit.htm @@ -33,6 +33,12 @@ +
+ + +
diff --git a/interface/web/tools/templates/user_settings.htm b/interface/web/tools/templates/user_settings.htm index 49c2a55844..969c21b2ba 100644 --- a/interface/web/tools/templates/user_settings.htm +++ b/interface/web/tools/templates/user_settings.htm @@ -16,7 +16,7 @@
- +
diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 3356fb3a5e..f9cfb39f77 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -155,40 +155,48 @@ # IdleTimeout n (300 seconds) # An idle fastcgi application will be terminated after IdleTimeout seconds. - FcgidIdleTimeout 300 + # FcgidIdleTimeout 300 + IdleTimeout 300 # ProcessLifeTime n (3600 seconds) # A fastcgi application will be terminated if lifetime expired, even no error is detected. - FcgidProcessLifeTime 3600 + # FcgidProcessLifeTime 3600 + ProcessLifeTime 3600 # MaxProcessCount n (1000) # The max count of total fastcgi process count. # FcgidMaxProcesses 1000 + MaxProcessCount 1000 # DefaultMinClassProcessCount n (3) # The minimum number of fastcgi application instances for any one fastcgi application. # Idle fastcgi will not be killed if their count is less than n # Set this to 0, and tweak IdleTimeout - FcgidMinProcessesPerClass 0 + # FcgidMinProcessesPerClass 0 + DefaultMinClassProcessCount 0 # DefaultMaxClassProcessCount n (100) # The maximum number of fastcgi application instances allowed to run for # particular one fastcgi application. - FcgidMaxProcessesPerClass 100 + # FcgidMaxProcessesPerClass 100 + DefaultMaxClassProcessCount 100 # IPCConnectTimeout n (3 seconds) # The connect timeout to a fastcgi application. - FcgidConnectTimeout 3 + # FcgidConnectTimeout 3 + IPCConnectTimeout 3 # IPCCommTimeout n (20 seconds) # The communication timeout to a fastcgi application. Please increase this # value if your CGI have a slow initialization or slow respond. - FcgidIOTimeout 360 + # FcgidIOTimeout 360 + IPCCommTimeout 360 # BusyTimeout n (300 seconds) # A fastcgi application will be terminated if handing a single request # longer than busy timeout. - FcgidBusyTimeout 300 + # FcgidBusyTimeout 300 + BusyTimeout 300 @@ -377,44 +385,27 @@ # php as fast-cgi enabled + # See: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html - # IdleTimeout n (300 seconds) - # An idle fastcgi application will be terminated after IdleTimeout seconds. + + IdleTimeout 300 + ProcessLifeTime 3600 + MaxProcessCount 1000 + DefaultMinClassProcessCount 0 + DefaultMaxClassProcessCount 100 + IPCConnectTimeout 3 + IPCCommTimeout 360 + BusyTimeout 300 + FcgidIdleTimeout 300 - - # ProcessLifeTime n (3600 seconds) - # A fastcgi application will be terminated if lifetime expired, even no error is detected. - FcgidProcessLifeTime 3600 - - # MaxProcessCount n (1000) - # The max count of total fastcgi process count. - # FcgidMaxProcesses 1000 - - # DefaultMinClassProcessCount n (3) - # The minimum number of fastcgi application instances for any one fastcgi application. - # Idle fastcgi will not be killed if their count is less than n - # Set this to 0, and tweak IdleTimeout + FcgidProcessLifeTime 3600 + FcgidMaxProcesses 1000 FcgidMinProcessesPerClass 0 - - # DefaultMaxClassProcessCount n (100) - # The maximum number of fastcgi application instances allowed to run for - # particular one fastcgi application. - FcgidMaxProcessesPerClass 100 - - # IPCConnectTimeout n (3 seconds) - # The connect timeout to a fastcgi application. - FcgidConnectTimeout 3 - - # IPCCommTimeout n (20 seconds) - # The communication timeout to a fastcgi application. Please increase this - # value if your CGI have a slow initialization or slow respond. - FcgidIOTimeout 360 - - # BusyTimeout n (300 seconds) - # A fastcgi application will be terminated if handing a single request - # longer than busy timeout. + FcgidMaxProcessesPerClass 100 + FcgidConnectTimeout 3 + FcgidIOTimeout 360 FcgidBusyTimeout 300 - + AddHandler fcgid-script .php .php3 .php4 .php5 diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 77a1b08ae2..7df529e9a6 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -820,6 +820,7 @@ class apache2_plugin { $tpl->setVar('fastcgi_alias',$fastcgi_config['fastcgi_alias']); $tpl->setVar('fastcgi_starter_path',$fastcgi_starter_path); $tpl->setVar('fastcgi_starter_script',$fastcgi_config['fastcgi_starter_script']); + $tpl->setVar('fastcgi_config_syntax',$fastcgi_config['fastcgi_config_syntax']); } -- GitLab