Skip to content

Commit e78ec10

Browse files
author
Marius Burkard
committed
- remove support for apache < 2.4
1 parent 613afed commit e78ec10

16 files changed

+13
-283
lines changed

install/dist/tpl/gentoo/apache_apps.vhost.master

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
SetHandler fcgid-script
2222
</FilesMatch>
2323
FCGIWrapper {website_basedir}/php-fcgi-scripts/apps/.php-fcgi-starter .php
24-
Order allow,deny
25-
Allow from all
24+
Require all granted
2625
</Directory>
2726
DirectoryIndex index.php
2827
</IfModule>
@@ -33,8 +32,7 @@
3332
<Directory {apps_vhost_dir}>
3433
Options +FollowSymLinks
3534
AllowOverride None
36-
Order allow,deny
37-
Allow from all
35+
Require all granted
3836
</Directory>
3937
</IfModule>
4038

install/dist/tpl/gentoo/apache_ispconfig.conf.master

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m
99

1010
<Directory /var/www/clients>
1111
AllowOverride None
12-
Order Deny,Allow
13-
Deny from all
12+
Require all denied
1413
</Directory>
1514

1615
# allow path to awstats and alias for awstats icons
1716
<Directory /usr/share/awstats>
18-
Order allow,deny
19-
Allow from all
17+
Require all granted
2018
</Directory>
2119
Alias /awstats/icon "/usr/share/awstats/htdocs/icon"

install/dist/tpl/gentoo/apache_ispconfig.vhost.master

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ NameVirtualHost *:{vhost_port}
2020
SetHandler fcgid-script
2121
</FilesMatch>
2222
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
23-
Order allow,deny
24-
Allow from all
23+
Require all granted
2524
</Directory>
2625
DirectoryIndex index.php
2726
</IfModule>
@@ -32,8 +31,7 @@ NameVirtualHost *:{vhost_port}
3231
<Directory /usr/local/ispconfig/interface/web>
3332
Options +FollowSymLinks
3433
AllowOverride None
35-
Order allow,deny
36-
Allow from all
34+
Require all granted
3735
php_value magic_quotes_gpc 0
3836
</Directory>
3937
</IfModule>

install/lib/install.lib.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,20 +970,20 @@ function getapacheversion($get_minor = false) {
970970
elseif(is_installed('apachectl')) $cmd = 'apachectl -v';
971971
else {
972972
ilog("Could not check apache version, apachectl not found.");
973-
return '2.2';
973+
return '2.4';
974974
}
975975

976976
exec($cmd, $output, $return_var);
977977
if($return_var != 0 || !$output[0]) {
978978
ilog("Could not check apache version, apachectl did not return any data.");
979-
return '2.2';
979+
return '2.4';
980980
}
981981

982982
if(preg_match('/version:\s*Apache\/(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
983983
return $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) && $get_minor == true ? '.' . $matches[5] : '');
984984
} else {
985985
ilog("Could not check apache version, did not find version string in apachectl output.");
986-
return '2.2';
986+
return '2.4';
987987
}
988988
}
989989

install/tpl/apache_apps.vhost.master

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@
2525
<Directory {tmpl_var name='apps_vhost_dir'}>
2626
Options FollowSymLinks
2727
AllowOverride None
28-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
2928
Require all granted
30-
<tmpl_else>
31-
Order allow,deny
32-
Allow from all
33-
</tmpl_if>
3429
</Directory>
3530
</IfModule>
3631

@@ -40,12 +35,7 @@
4035
<Directory {tmpl_var name='apps_vhost_dir'}>
4136
Options FollowSymLinks
4237
AllowOverride None
43-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
4438
Require all granted
45-
<tmpl_else>
46-
Order allow,deny
47-
Allow from all
48-
</tmpl_if>
4939
</Directory>
5040
</IfModule>
5141

@@ -59,12 +49,7 @@
5949
SetHandler fcgid-script
6050
</FilesMatch>
6151
FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php
62-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
6352
Require all granted
64-
<tmpl_else>
65-
Order allow,deny
66-
Allow from all
67-
</tmpl_if>
6853
</Directory>
6954
</IfModule>
7055

install/tpl/apache_ispconfig.conf.master

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -27,131 +27,63 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m
2727

2828
<Directory /var/www/clients>
2929
AllowOverride None
30-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
3130
Require all denied
32-
<tmpl_else>
33-
Order Deny,Allow
34-
Deny from all
35-
</tmpl_if>
3631
</Directory>
3732

3833
# Do not allow access to the root file system of the server for security reasons
3934
<Directory />
4035
Options -Indexes
4136
AllowOverride None
42-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
4337
Require all denied
44-
<tmpl_else>
45-
Order Deny,Allow
46-
Deny from all
47-
</tmpl_if>
4838
</Directory>
4939

5040
<Directory /var/www/conf>
5141
AllowOverride None
52-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
5342
Require all denied
54-
<tmpl_else>
55-
Order Deny,Allow
56-
Deny from all
57-
</tmpl_if>
5843
</Directory>
5944

6045
# Except of the following directories that contain website scripts
6146
<Directory /usr/share/phpmyadmin>
62-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
6347
Require all granted
64-
<tmpl_else>
65-
Order allow,deny
66-
Allow from all
67-
</tmpl_if>
6848
</Directory>
6949

7050
<Directory /usr/share/phpMyAdmin>
71-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
7251
Require all granted
73-
<tmpl_else>
74-
Order allow,deny
75-
Allow from all
76-
</tmpl_if>
7752
</Directory>
7853

7954
<Directory /srv/www/htdocs>
80-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
8155
Require all granted
82-
<tmpl_else>
83-
Order allow,deny
84-
Allow from all
85-
</tmpl_if>
8656
</Directory>
8757

8858
<Directory /usr/share/squirrelmail>
89-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
9059
Require all granted
91-
<tmpl_else>
92-
Order allow,deny
93-
Allow from all
94-
</tmpl_if>
9560
</Directory>
9661

9762
# Allow access to mailman on OpenSuSE
9863
<Directory /usr/lib/mailman/cgi-bin>
99-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
10064
Require all granted
101-
<tmpl_else>
102-
Order allow,deny
103-
Allow from all
104-
</tmpl_if>
10565
</Directory>
10666

10767
<Directory /usr/lib/mailman/icons>
108-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
10968
Require all granted
110-
<tmpl_else>
111-
Order allow,deny
112-
Allow from all
113-
</tmpl_if>
11469
</Directory>
11570

11671
<Directory /var/lib/mailman/archives/>
11772
Options +FollowSymLinks
118-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
11973
Require all granted
120-
<tmpl_else>
121-
Order allow,deny
122-
Allow from all
123-
</tmpl_if>
12474
</Directory>
12575

12676
# allow path to awstats and alias for awstats icons
12777
<Directory /usr/share/awstats>
128-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
12978
Require all granted
130-
<tmpl_else>
131-
Order allow,deny
132-
Allow from all
133-
</tmpl_if>
13479
</Directory>
13580

13681
Alias /awstats-icon "/usr/share/awstats/icon"
13782

13883
Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge
13984
<Directory /usr/local/ispconfig/interface/acme/.well-known/acme-challenge>
140-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
14185
Require all granted
142-
<tmpl_else>
143-
Order allow,deny
144-
Allow from all
145-
</tmpl_if>
14686
<IfModule mpm_itk_module>
14787
AssignUserId www-data www-data
14888
</IfModule>
14989
</Directory>
150-
151-
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
152-
NameVirtualHost *:80
153-
NameVirtualHost *:443
154-
<tmpl_loop name="ip_adresses">
155-
NameVirtualHost {tmpl_var name="ip_address"}:{tmpl_var name="port"}
156-
</tmpl_loop>
157-
</tmpl_if>

install/tpl/apache_ispconfig.vhost.master

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@
3333
SetHandler fcgid-script
3434
</FilesMatch>
3535
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
36-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
3736
Require all granted
38-
<tmpl_else>
39-
Order allow,deny
40-
Allow from all
41-
</tmpl_if>
4237
</Directory>
4338
IPCCommTimeout 7200
4439
MaxRequestLen 15728640
@@ -52,12 +47,7 @@
5247
# php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
5348
Options +FollowSymLinks
5449
AllowOverride None
55-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
5650
Require all granted
57-
<tmpl_else>
58-
Order allow,deny
59-
Allow from all
60-
</tmpl_if>
6151
php_value magic_quotes_gpc 0
6252
</Directory>
6353
</IfModule>
@@ -121,20 +111,10 @@
121111

122112
<Directory /var/www/php-cgi-scripts>
123113
AllowOverride None
124-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
125114
Require all denied
126-
<tmpl_else>
127-
Order Deny,Allow
128-
Deny from all
129-
</tmpl_if>
130115
</Directory>
131116

132117
<Directory /var/www/php-fcgi-scripts>
133118
AllowOverride None
134-
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
135119
Require all denied
136-
<tmpl_else>
137-
Order Deny,Allow
138-
Deny from all
139-
</tmpl_if>
140120
</Directory>

install/tpl/server.ini.master

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ fastcgi_phpini_path=/etc/php5/cgi/
134134
fastcgi_children=8
135135
fastcgi_max_requests=5000
136136
fastcgi_bin=/usr/bin/php-cgi
137-
fastcgi_config_syntax=2
138137

139138
[jailkit]
140139
jailkit_chroot_home=/home/[username]

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,15 +1602,7 @@
16021602
'value' => '',
16031603
'width' => '40',
16041604
'maxlength' => '255'
1605-
),
1606-
'fastcgi_config_syntax' => array(
1607-
'datatype' => 'INTEGER',
1608-
'formtype' => 'SELECT',
1609-
'default' => '2',
1610-
'value' => array('1' => 'Old (apache 2.0)', '2' => 'New (apache 2.2)'),
1611-
'width' => '40',
1612-
'maxlength' => '255'
1613-
),
1605+
)
16141606
//#################################
16151607
// ENDE Datatable fields
16161608
//#################################

interface/web/admin/templates/server_config_fastcgi_edit.htm

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ <h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
2626
<div class="form-group">
2727
<label for="fastcgi_bin" class="col-sm-3 control-label">{tmpl_var name='fastcgi_bin_txt'}</label>
2828
<div class="col-sm-9"><input type="text" name="fastcgi_bin" id="fastcgi_bin" value="{tmpl_var name='fastcgi_bin'}" class="form-control" /></div></div>
29-
<div class="form-group">
30-
<label for="fastcgi_config_syntax" class="col-sm-3 control-label">{tmpl_var name='fastcgi_config_syntax_txt'}</label>
31-
<div class="col-sm-9"><select name="fastcgi_config_syntax" id="fastcgi_config_syntax" class="form-control">
32-
{tmpl_var name='fastcgi_config_syntax'}
33-
</select></div>
34-
</div>
3529

3630

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

0 commit comments

Comments
 (0)