File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1616 $libphp_prefix = ' libphp'
1717) inherits apache::params {
1818 include apache
19- if (versioncmp($php_version , ' 7 ' ) <= 0) {
19+ if (versioncmp($php_version , ' 8 ' ) < 0) {
2020 $mod = " php${php_version} "
2121 } else {
2222 $mod = ' php'
7878 id => " php${_php_major}_module" ,
7979 path => " ${apache::lib_path} /mod_${mod} .so" ,
8080 }
81- } elsif (versioncmp($php_version , ' 7 ' ) <= 0) {
81+ } elsif (versioncmp($php_version , ' 8 ' ) < 0) {
8282 ::apache::mod { $mod:
8383 package => $_package_name,
8484 package_ensure => $package_ensure ,
Original file line number Diff line number Diff line change 698698 $logroot_mode = undef
699699 $lib_path = ' /usr/lib64/apache2' # changes for some modules based on mpm
700700 $mpm_module = ' prefork'
701-
702701 if versioncmp($::operatingsystemrelease , ' 15' ) < 0 {
703702 $default_ssl_cert = ' /etc/apache2/ssl.crt/server.crt'
704703 $default_ssl_key = ' /etc/apache2/ssl.key/server.key'
704+ $php_version = ' 5'
705705 } else {
706706 $default_ssl_cert = ' /etc/apache2/ssl.crt/default-server.crt'
707707 $default_ssl_key = ' /etc/apache2/ssl.key/default-server.key'
708+ $php_version = ' 7'
708709 }
710+ $suphp_configpath = " /etc/php${php_version} /apache2"
709711 $ssl_sessioncache = ' /var/lib/apache2/ssl_scache(512000)'
710712 $suphp_addhandler = ' x-httpd-php'
711713 $suphp_engine = ' off'
712- $suphp_configpath = ' /etc/php5/apache2'
713- $php_version = ' 5'
714714 if versioncmp($::operatingsystemrelease , ' 11' ) < 0 or versioncmp($::operatingsystemrelease , ' 12' ) >= 0 {
715- $mod_packages = {
715+ $mod_packages = {
716716 ' auth_kerb' => ' apache2-mod_auth_kerb' ,
717717 ' auth_gssapi' => ' apache2-mod_auth_gssapi' ,
718718 ' dav_svn' => ' subversion-server' ,
719719 ' perl' => ' apache2-mod_perl' ,
720720 ' php5' => ' apache2-mod_php5' ,
721+ ' php7' => ' apache2-mod_php7' ,
721722 ' python' => ' apache2-mod_python' ,
722723 ' security' => ' apache2-mod_security2' ,
723724 ' worker' => ' apache2-worker' ,
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ class { 'apache::mod::php': }
4545 describe file ( "#{ apache_hash [ 'mod_dir' ] } /php7.conf" ) do
4646 it { is_expected . to contain 'DirectoryIndex index.php' }
4747 end
48+ elsif os [ :family ] == 'sles' && os [ :release ] . to_i >= 15
49+ describe file ( "#{ apache_hash [ 'mod_dir' ] } /php7.conf" ) do
50+ it { is_expected . to contain 'DirectoryIndex index.php' }
51+ end
4852 else
4953 describe file ( "#{ apache_hash [ 'mod_dir' ] } /php5.conf" ) do
5054 it { is_expected . to contain 'DirectoryIndex index.php' }
Original file line number Diff line number Diff line change 207207
208208 # all the following tests are for legacy php/apache versions. They don't work on modern ubuntu and redhat 8
209209 next if ( facts [ :os ] [ 'release' ] [ 'major' ] . to_i > 15 && facts [ :os ] [ 'name' ] == 'Ubuntu' ) ||
210+ ( facts [ :os ] [ 'release' ] [ 'major' ] . to_i >= 15 && facts [ :os ] [ 'name' ] == 'SLES' ) ||
210211 ( facts [ :os ] [ 'release' ] [ 'major' ] . to_i >= 9 && facts [ :os ] [ 'name' ] == 'Debian' ) ||
211212 ( facts [ :os ] [ 'release' ] [ 'major' ] . to_i >= 8 && ( facts [ :os ] [ 'name' ] == 'RedHat' || facts [ :os ] [ 'name' ] == 'CentOS' ) )
212213
You can’t perform that action at this time.
0 commit comments