Skip to content

Commit 8247806

Browse files
committed
Made fastcgi syntax configurable to support older apache versions.
1 parent 752b269 commit 8247806

File tree

7 files changed

+52
-45
lines changed

7 files changed

+52
-45
lines changed

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ fastcgi_phpini_path=/etc/php5/cgi/
7070
fastcgi_children=8
7171
fastcgi_max_requests=5000
7272
fastcgi_bin=/usr/bin/php-cgi
73+
fastcgi_config_syntax=1
7374

7475
[jailkit]
7576
jailkit_chroot_home=/home/[username]

interface/web/admin/form/server_config.tform.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,14 @@
686686
'width' => '40',
687687
'maxlength' => '255'
688688
),
689+
'fastcgi_config_syntax' => array(
690+
'datatype' => 'INTEGER',
691+
'formtype' => 'SELECT',
692+
'default' => '2',
693+
'value' => array('1' => 'Old', '2' => 'New'),
694+
'width' => '40',
695+
'maxlength' => '255'
696+
),
689697
##################################
690698
# ENDE Datatable fields
691699
##################################

interface/web/admin/lib/lang/en_server_config.lng

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ $wb["ufw_default_output_policy_txt"] = 'Default Output Policy';
77
$wb["ufw_default_forward_policy_txt"] = 'Default Forward Policy';
88
$wb["ufw_default_application_policy_txt"] = 'Default Application Policy';
99
$wb["ufw_log_level_txt"] = 'Log Level';
10-
1110
$wb["jailkit_chroot_home_txt"] = 'Jailkit chroot home';
1211
$wb["jailkit_chroot_app_sections_txt"] = 'Jailkit chroot app sections';
1312
$wb["jailkit_chroot_app_programs_txt"] = 'Jailkit chrooted applications';
14-
$wb['jailkit_chroot_cron_programs_txt'] = 'Jailkit cron chrooted applications';
13+
$wb["jailkit_chroot_cron_programs_txt"] = 'Jailkit cron chrooted applications';
1514
$wb["website_path_txt"] = 'Website path';
1615
$wb["website_symlinks_txt"] = 'Website symlinks';
1716
$wb["website_basedir_txt"] = 'Website basedir';
@@ -86,4 +85,5 @@ $wb["check_apache_config_txt"] = 'Test apache configuration on restart';
8685
$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.';
8786
$wb["CA_path_txt"] = 'CA Path';
8887
$wb["CA_pass_txt"] = 'CA passphrase';
89-
?>
88+
$wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax';
89+
?>

interface/web/admin/templates/server_config_fastcgi_edit.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ <h2><tmpl_var name="list_head_txt"></h2>
3333
<label for="fastcgi_bin">{tmpl_var name='fastcgi_bin_txt'}</label>
3434
<input name="fastcgi_bin" id="fastcgi_bin" value="{tmpl_var name='fastcgi_bin'}" size="40" maxlength="255" type="text" class="textInput" />
3535
</div>
36+
<div class="ctrlHolder">
37+
<label for="fastcgi_config_syntax">{tmpl_var name='fastcgi_config_syntax_txt'}</label>
38+
<select name="fastcgi_config_syntax" id="fastcgi_config_syntax" class="selectInput">
39+
{tmpl_var name='fastcgi_config_syntax'}
40+
</select>
41+
</div>
3642
</fieldset>
3743

3844
<input type="hidden" name="id" value="{tmpl_var name='id'}">

interface/web/tools/templates/user_settings.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
1616
</div>
1717
<div class="ctrlHolder">
1818
<label for="passwort2">{tmpl_var name='passwort_txt'}</label>
19-
<input name="passwort2" id="passwort2" value="" size="15" maxlength="100" type="password" class="textInput" />
19+
<input name="passwort2" id="passwort2" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;"/>
2020
</div>
2121
<div class="ctrlHolder">
2222
<label for="language">{tmpl_var name='language_txt'}</label>

server/conf/vhost.conf.master

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -155,40 +155,48 @@
155155

156156
# IdleTimeout n (300 seconds)
157157
# An idle fastcgi application will be terminated after IdleTimeout seconds.
158-
FcgidIdleTimeout 300
158+
# FcgidIdleTimeout 300
159+
IdleTimeout 300
159160

160161
# ProcessLifeTime n (3600 seconds)
161162
# A fastcgi application will be terminated if lifetime expired, even no error is detected.
162-
FcgidProcessLifeTime 3600
163+
# FcgidProcessLifeTime 3600
164+
ProcessLifeTime 3600
163165

164166
# MaxProcessCount n (1000)
165167
# The max count of total fastcgi process count.
166168
# FcgidMaxProcesses 1000
169+
MaxProcessCount 1000
167170

168171
# DefaultMinClassProcessCount n (3)
169172
# The minimum number of fastcgi application instances for any one fastcgi application.
170173
# Idle fastcgi will not be killed if their count is less than n
171174
# Set this to 0, and tweak IdleTimeout
172-
FcgidMinProcessesPerClass 0
175+
# FcgidMinProcessesPerClass 0
176+
DefaultMinClassProcessCount 0
173177

174178
# DefaultMaxClassProcessCount n (100)
175179
# The maximum number of fastcgi application instances allowed to run for
176180
# particular one fastcgi application.
177-
FcgidMaxProcessesPerClass 100
181+
# FcgidMaxProcessesPerClass 100
182+
DefaultMaxClassProcessCount 100
178183

179184
# IPCConnectTimeout n (3 seconds)
180185
# The connect timeout to a fastcgi application.
181-
FcgidConnectTimeout 3
186+
# FcgidConnectTimeout 3
187+
IPCConnectTimeout 3
182188

183189
# IPCCommTimeout n (20 seconds)
184190
# The communication timeout to a fastcgi application. Please increase this
185191
# value if your CGI have a slow initialization or slow respond.
186-
FcgidIOTimeout 360
192+
# FcgidIOTimeout 360
193+
IPCCommTimeout 360
187194

188195
# BusyTimeout n (300 seconds)
189196
# A fastcgi application will be terminated if handing a single request
190197
# longer than busy timeout.
191-
FcgidBusyTimeout 300
198+
# FcgidBusyTimeout 300
199+
BusyTimeout 300
192200

193201
</IfModule>
194202
<Directory {tmpl_var name='web_document_root_www'}>
@@ -377,44 +385,27 @@
377385
</tmpl_if>
378386
<tmpl_if name='php' op='==' value='fast-cgi'>
379387
# php as fast-cgi enabled
388+
# See: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
380389
<IfModule mod_fcgid.c>
381-
# IdleTimeout n (300 seconds)
382-
# An idle fastcgi application will be terminated after IdleTimeout seconds.
390+
<tmpl_if name='fastcgi_config_syntax' op='==' value='1'>
391+
IdleTimeout 300
392+
ProcessLifeTime 3600
393+
MaxProcessCount 1000
394+
DefaultMinClassProcessCount 0
395+
DefaultMaxClassProcessCount 100
396+
IPCConnectTimeout 3
397+
IPCCommTimeout 360
398+
BusyTimeout 300
399+
<tmpl_else>
383400
FcgidIdleTimeout 300
384-
385-
# ProcessLifeTime n (3600 seconds)
386-
# A fastcgi application will be terminated if lifetime expired, even no error is detected.
387-
FcgidProcessLifeTime 3600
388-
389-
# MaxProcessCount n (1000)
390-
# The max count of total fastcgi process count.
391-
# FcgidMaxProcesses 1000
392-
393-
# DefaultMinClassProcessCount n (3)
394-
# The minimum number of fastcgi application instances for any one fastcgi application.
395-
# Idle fastcgi will not be killed if their count is less than n
396-
# Set this to 0, and tweak IdleTimeout
401+
FcgidProcessLifeTime 3600
402+
FcgidMaxProcesses 1000
397403
FcgidMinProcessesPerClass 0
398-
399-
# DefaultMaxClassProcessCount n (100)
400-
# The maximum number of fastcgi application instances allowed to run for
401-
# particular one fastcgi application.
402-
FcgidMaxProcessesPerClass 100
403-
404-
# IPCConnectTimeout n (3 seconds)
405-
# The connect timeout to a fastcgi application.
406-
FcgidConnectTimeout 3
407-
408-
# IPCCommTimeout n (20 seconds)
409-
# The communication timeout to a fastcgi application. Please increase this
410-
# value if your CGI have a slow initialization or slow respond.
411-
FcgidIOTimeout 360
412-
413-
# BusyTimeout n (300 seconds)
414-
# A fastcgi application will be terminated if handing a single request
415-
# longer than busy timeout.
404+
FcgidMaxProcessesPerClass 100
405+
FcgidConnectTimeout 3
406+
FcgidIOTimeout 360
416407
FcgidBusyTimeout 300
417-
408+
</tmpl_if>
418409
</IfModule>
419410
<Directory {tmpl_var name='web_document_root_www'}>
420411
AddHandler fcgid-script .php .php3 .php4 .php5

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ function update($event_name,$data) {
820820
$tpl->setVar('fastcgi_alias',$fastcgi_config['fastcgi_alias']);
821821
$tpl->setVar('fastcgi_starter_path',$fastcgi_starter_path);
822822
$tpl->setVar('fastcgi_starter_script',$fastcgi_config['fastcgi_starter_script']);
823+
$tpl->setVar('fastcgi_config_syntax',$fastcgi_config['fastcgi_config_syntax']);
823824

824825
}
825826

0 commit comments

Comments
 (0)