Commit e78ec10f authored by Marius Burkard's avatar Marius Burkard

- remove support for apache < 2.4

parent 613afed0
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
SetHandler fcgid-script SetHandler fcgid-script
</FilesMatch> </FilesMatch>
FCGIWrapper {website_basedir}/php-fcgi-scripts/apps/.php-fcgi-starter .php FCGIWrapper {website_basedir}/php-fcgi-scripts/apps/.php-fcgi-starter .php
Order allow,deny Require all granted
Allow from all
</Directory> </Directory>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>
...@@ -33,8 +32,7 @@ ...@@ -33,8 +32,7 @@
<Directory {apps_vhost_dir}> <Directory {apps_vhost_dir}>
Options +FollowSymLinks Options +FollowSymLinks
AllowOverride None AllowOverride None
Order allow,deny Require all granted
Allow from all
</Directory> </Directory>
</IfModule> </IfModule>
......
...@@ -9,13 +9,11 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m ...@@ -9,13 +9,11 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m
<Directory /var/www/clients> <Directory /var/www/clients>
AllowOverride None AllowOverride None
Order Deny,Allow Require all denied
Deny from all
</Directory> </Directory>
# allow path to awstats and alias for awstats icons # allow path to awstats and alias for awstats icons
<Directory /usr/share/awstats> <Directory /usr/share/awstats>
Order allow,deny Require all granted
Allow from all
</Directory> </Directory>
Alias /awstats/icon "/usr/share/awstats/htdocs/icon" Alias /awstats/icon "/usr/share/awstats/htdocs/icon"
...@@ -20,8 +20,7 @@ NameVirtualHost *:{vhost_port} ...@@ -20,8 +20,7 @@ NameVirtualHost *:{vhost_port}
SetHandler fcgid-script SetHandler fcgid-script
</FilesMatch> </FilesMatch>
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
Order allow,deny Require all granted
Allow from all
</Directory> </Directory>
DirectoryIndex index.php DirectoryIndex index.php
</IfModule> </IfModule>
...@@ -32,8 +31,7 @@ NameVirtualHost *:{vhost_port} ...@@ -32,8 +31,7 @@ NameVirtualHost *:{vhost_port}
<Directory /usr/local/ispconfig/interface/web> <Directory /usr/local/ispconfig/interface/web>
Options +FollowSymLinks Options +FollowSymLinks
AllowOverride None AllowOverride None
Order allow,deny Require all granted
Allow from all
php_value magic_quotes_gpc 0 php_value magic_quotes_gpc 0
</Directory> </Directory>
</IfModule> </IfModule>
......
...@@ -970,20 +970,20 @@ function getapacheversion($get_minor = false) { ...@@ -970,20 +970,20 @@ function getapacheversion($get_minor = false) {
elseif(is_installed('apachectl')) $cmd = 'apachectl -v'; elseif(is_installed('apachectl')) $cmd = 'apachectl -v';
else { else {
ilog("Could not check apache version, apachectl not found."); ilog("Could not check apache version, apachectl not found.");
return '2.2'; return '2.4';
} }
exec($cmd, $output, $return_var); exec($cmd, $output, $return_var);
if($return_var != 0 || !$output[0]) { if($return_var != 0 || !$output[0]) {
ilog("Could not check apache version, apachectl did not return any data."); ilog("Could not check apache version, apachectl did not return any data.");
return '2.2'; return '2.4';
} }
if(preg_match('/version:\s*Apache\/(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) { if(preg_match('/version:\s*Apache\/(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
return $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) && $get_minor == true ? '.' . $matches[5] : ''); return $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) && $get_minor == true ? '.' . $matches[5] : '');
} else { } else {
ilog("Could not check apache version, did not find version string in apachectl output."); ilog("Could not check apache version, did not find version string in apachectl output.");
return '2.2'; return '2.4';
} }
} }
......
...@@ -25,12 +25,7 @@ ...@@ -25,12 +25,7 @@
<Directory {tmpl_var name='apps_vhost_dir'}> <Directory {tmpl_var name='apps_vhost_dir'}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
</IfModule> </IfModule>
...@@ -40,12 +35,7 @@ ...@@ -40,12 +35,7 @@
<Directory {tmpl_var name='apps_vhost_dir'}> <Directory {tmpl_var name='apps_vhost_dir'}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
</IfModule> </IfModule>
...@@ -59,12 +49,7 @@ ...@@ -59,12 +49,7 @@
SetHandler fcgid-script SetHandler fcgid-script
</FilesMatch> </FilesMatch>
FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
</IfModule> </IfModule>
......
...@@ -27,131 +27,63 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m ...@@ -27,131 +27,63 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m
<Directory /var/www/clients> <Directory /var/www/clients>
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
# Do not allow access to the root file system of the server for security reasons # Do not allow access to the root file system of the server for security reasons
<Directory /> <Directory />
Options -Indexes Options -Indexes
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
<Directory /var/www/conf> <Directory /var/www/conf>
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
# Except of the following directories that contain website scripts # Except of the following directories that contain website scripts
<Directory /usr/share/phpmyadmin> <Directory /usr/share/phpmyadmin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /usr/share/phpMyAdmin> <Directory /usr/share/phpMyAdmin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /srv/www/htdocs> <Directory /srv/www/htdocs>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /usr/share/squirrelmail> <Directory /usr/share/squirrelmail>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
# Allow access to mailman on OpenSuSE # Allow access to mailman on OpenSuSE
<Directory /usr/lib/mailman/cgi-bin> <Directory /usr/lib/mailman/cgi-bin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /usr/lib/mailman/icons> <Directory /usr/lib/mailman/icons>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /var/lib/mailman/archives/> <Directory /var/lib/mailman/archives/>
Options +FollowSymLinks Options +FollowSymLinks
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
# allow path to awstats and alias for awstats icons # allow path to awstats and alias for awstats icons
<Directory /usr/share/awstats> <Directory /usr/share/awstats>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
Alias /awstats-icon "/usr/share/awstats/icon" Alias /awstats-icon "/usr/share/awstats/icon"
Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge
<Directory /usr/local/ispconfig/interface/acme/.well-known/acme-challenge> <Directory /usr/local/ispconfig/interface/acme/.well-known/acme-challenge>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
<IfModule mpm_itk_module> <IfModule mpm_itk_module>
AssignUserId www-data www-data AssignUserId www-data www-data
</IfModule> </IfModule>
</Directory> </Directory>
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
NameVirtualHost *:80
NameVirtualHost *:443
<tmpl_loop name="ip_adresses">
NameVirtualHost {tmpl_var name="ip_address"}:{tmpl_var name="port"}
</tmpl_loop>
</tmpl_if>
...@@ -33,12 +33,7 @@ ...@@ -33,12 +33,7 @@
SetHandler fcgid-script SetHandler fcgid-script
</FilesMatch> </FilesMatch>
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
IPCCommTimeout 7200 IPCCommTimeout 7200
MaxRequestLen 15728640 MaxRequestLen 15728640
...@@ -52,12 +47,7 @@ ...@@ -52,12 +47,7 @@
# php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp" # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
Options +FollowSymLinks Options +FollowSymLinks
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
php_value magic_quotes_gpc 0 php_value magic_quotes_gpc 0
</Directory> </Directory>
</IfModule> </IfModule>
...@@ -121,20 +111,10 @@ ...@@ -121,20 +111,10 @@
<Directory /var/www/php-cgi-scripts> <Directory /var/www/php-cgi-scripts>
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
<Directory /var/www/php-fcgi-scripts> <Directory /var/www/php-fcgi-scripts>
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
...@@ -134,7 +134,6 @@ fastcgi_phpini_path=/etc/php5/cgi/ ...@@ -134,7 +134,6 @@ fastcgi_phpini_path=/etc/php5/cgi/
fastcgi_children=8 fastcgi_children=8
fastcgi_max_requests=5000 fastcgi_max_requests=5000
fastcgi_bin=/usr/bin/php-cgi fastcgi_bin=/usr/bin/php-cgi
fastcgi_config_syntax=2
[jailkit] [jailkit]
jailkit_chroot_home=/home/[username] jailkit_chroot_home=/home/[username]
......
...@@ -1602,15 +1602,7 @@ $form["tabs"]['fastcgi'] = array( ...@@ -1602,15 +1602,7 @@ $form["tabs"]['fastcgi'] = array(
'value' => '', 'value' => '',
'width' => '40', 'width' => '40',
'maxlength' => '255' 'maxlength' => '255'
), )
'fastcgi_config_syntax' => array(
'datatype' => 'INTEGER',
'formtype' => 'SELECT',
'default' => '2',
'value' => array('1' => 'Old (apache 2.0)', '2' => 'New (apache 2.2)'),
'width' => '40',
'maxlength' => '255'
),
//################################# //#################################
// ENDE Datatable fields // ENDE Datatable fields
//################################# //#################################
......
...@@ -26,12 +26,6 @@ ...@@ -26,12 +26,6 @@
<div class="form-group"> <div class="form-group">
<label for="fastcgi_bin" class="col-sm-3 control-label">{tmpl_var name='fastcgi_bin_txt'}</label> <label for="fastcgi_bin" class="col-sm-3 control-label">{tmpl_var name='fastcgi_bin_txt'}</label>
<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> <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>
<div class="form-group">
<label for="fastcgi_config_syntax" class="col-sm-3 control-label">{tmpl_var name='fastcgi_config_syntax_txt'}</label>
<div class="col-sm-9"><select name="fastcgi_config_syntax" id="fastcgi_config_syntax" class="form-control">
{tmpl_var name='fastcgi_config_syntax'}
</select></div>
</div>
<input type="hidden" name="id" value="{tmpl_var name='id'}"> <input type="hidden" name="id" value="{tmpl_var name='id'}">
......
...@@ -24,12 +24,7 @@ ...@@ -24,12 +24,7 @@
<Directory {tmpl_var name='apps_vhost_dir'}> <Directory {tmpl_var name='apps_vhost_dir'}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
</IfModule> </IfModule>
...@@ -39,12 +34,7 @@ ...@@ -39,12 +34,7 @@
<Directory {tmpl_var name='apps_vhost_dir'}> <Directory {tmpl_var name='apps_vhost_dir'}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
</IfModule> </IfModule>
...@@ -58,12 +48,7 @@ ...@@ -58,12 +48,7 @@
SetHandler fcgid-script SetHandler fcgid-script
</FilesMatch> </FilesMatch>
FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php FCGIWrapper {tmpl_var name='apps_vhost_basedir'}/php-fcgi-scripts/apps/.php-fcgi-starter .php
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
</IfModule> </IfModule>
......
...@@ -27,131 +27,63 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m ...@@ -27,131 +27,63 @@ CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m
<Directory /var/www/clients> <Directory /var/www/clients>
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
# Do not allow access to the root file system of the server for security reasons # Do not allow access to the root file system of the server for security reasons
<Directory /> <Directory />
Options -Indexes Options -Indexes
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
<Directory /var/www/conf> <Directory /var/www/conf>
AllowOverride None AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory> </Directory>
# Except of the following directories that contain website scripts # Except of the following directories that contain website scripts
<Directory /usr/share/phpmyadmin> <Directory /usr/share/phpmyadmin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /usr/share/phpMyAdmin> <Directory /usr/share/phpMyAdmin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /srv/www/htdocs> <Directory /srv/www/htdocs>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /usr/share/squirrelmail> <Directory /usr/share/squirrelmail>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
# Allow access to mailman on OpenSuSE # Allow access to mailman on OpenSuSE
<Directory /usr/lib/mailman/cgi-bin> <Directory /usr/lib/mailman/cgi-bin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /usr/lib/mailman/icons> <Directory /usr/lib/mailman/icons>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory> </Directory>
<Directory /var/lib/mailman/archives/> <Directory /var/lib/mailman/archives/>