Skip to content

Commit 1393439

Browse files
authored
Merge pull request #2263 from ekohl/drop-suphp
Drop suphp support
2 parents 83d077b + 35800a2 commit 1393439

File tree

11 files changed

+1
-234
lines changed

11 files changed

+1
-234
lines changed

README.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
[`apache::mod::shib`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodshib
6666
[`apache::mod::ssl`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodssl
6767
[`apache::mod::status`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodstatus
68-
[`apache::mod::suphp`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodsuphp
6968
[`apache::mod::userdir`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoduserdir
7069
[`apache::mod::worker`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodworker
7170
[`apache::mod::wsgi`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodwsgi
@@ -243,10 +242,6 @@
243242
[`ssl_compression`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ssl_compression
244243
[`ssl_key`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ssl_key
245244
[`StartServers`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#startservers
246-
[suPHP]: http://www.suphp.org/Home.html
247-
[`suphp_addhandler`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#suphp_addhandler
248-
[`suphp_configpath`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#suphp_configpath
249-
[`suphp_engine`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#suphp_engine
250245
[supported operating system]: https://forge.puppet.com/supported#puppet-supported-modules-compatibility-matrix
251246

252247
[`ThreadLimit`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#threadlimit
@@ -506,33 +501,6 @@ apache::vhost { 'subdomain.loc':
506501

507502
#### Configuring virtual hosts for apps and processors
508503

509-
To set up a virtual host with [suPHP][], use the following parameters:
510-
511-
* [`suphp_engine`][], to enable the suPHP engine.
512-
* [`suphp_addhandler`][], to define a MIME type.
513-
* [`suphp_configpath`][], to set which path suPHP passes to the PHP interpreter.
514-
* [`directories`][], to configure Directory, File, and Location directive blocks.
515-
516-
For example:
517-
518-
``` puppet
519-
apache::vhost { 'suphp.example.com':
520-
port => '80',
521-
docroot => '/home/appuser/myphpapp',
522-
suphp_addhandler => 'x-httpd-php',
523-
suphp_engine => 'on',
524-
suphp_configpath => '/etc/php5/apache2',
525-
directories => [
526-
{ 'path' => '/home/appuser/myphpapp',
527-
'suphp' => {
528-
user => 'myappuser',
529-
group => 'myappgroup',
530-
},
531-
},
532-
],
533-
}
534-
```
535-
536504
To configure a virtual host to use the [Web Server Gateway Interface][] (WSGI) for [Python][] applications, use the `wsgi` set of parameters:
537505

538506
``` puppet

manifests/mod/suphp.pp

Lines changed: 0 additions & 23 deletions
This file was deleted.

manifests/params.pp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@
8888
$passenger_root = undef
8989
$passenger_ruby = undef
9090
$passenger_default_ruby = undef
91-
$suphp_addhandler = 'php5-script'
92-
$suphp_engine = 'off'
93-
$suphp_configpath = undef
9491
$php_version = $apache::version::scl_php_version
9592
$mod_packages = {
9693
'authnz_ldap' => "${_scl_httpd_name}-mod_ldap",
@@ -200,9 +197,6 @@
200197
$passenger_root = undef
201198
$passenger_ruby = undef
202199
$passenger_default_ruby = undef
203-
$suphp_addhandler = 'php5-script'
204-
$suphp_engine = 'off'
205-
$suphp_configpath = undef
206200
$php_version = $facts['os']['release']['major'] ? {
207201
'9' => '8', # RedHat9
208202
'8' => '7', # RedHat8
@@ -261,7 +255,6 @@
261255
default => 'python3-mod_wsgi', # RedHat8+
262256
},
263257
'dav_svn' => 'mod_dav_svn',
264-
'suphp' => 'mod_suphp',
265258
'xsendfile' => 'mod_xsendfile',
266259
'nss' => 'mod_nss',
267260
'shib2' => 'shibboleth',
@@ -359,9 +352,6 @@
359352
$default_ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
360353
$default_ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key'
361354
$ssl_sessioncache = "\${APACHE_RUN_DIR}/ssl_scache(512000)"
362-
$suphp_addhandler = 'x-httpd-php'
363-
$suphp_engine = 'off'
364-
$suphp_configpath = '/etc/php5/apache2'
365355
if ($facts['os']['name'] == 'Ubuntu') or ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '11') < 0) {
366356
$php_version = $facts['os']['release']['major'] ? {
367357
'9' => '7.0', # Debian Stretch
@@ -527,9 +517,6 @@
527517
$passenger_root = '/usr/local/lib/ruby/gems/2.0/gems/passenger-4.0.58'
528518
$passenger_ruby = '/usr/local/bin/ruby'
529519
$passenger_default_ruby = undef
530-
$suphp_addhandler = 'php5-script'
531-
$suphp_engine = 'off'
532-
$suphp_configpath = undef
533520
$php_version = '5'
534521
$mod_packages = {
535522
# NOTE: I list here only modules that are not included in www/apache24
@@ -600,9 +587,6 @@
600587
$passenger_conf_file = 'passenger.conf'
601588
$passenger_conf_package_file = undef
602589
$passenger_default_ruby = undef
603-
$suphp_addhandler = 'x-httpd-php'
604-
$suphp_engine = 'off'
605-
$suphp_configpath = '/etc/php5/apache2'
606590
$php_version = '5'
607591
$mod_packages = {
608592
# NOTE: I list here only modules that are not included in www-servers/apache
@@ -672,10 +656,7 @@
672656
$default_ssl_key = '/etc/apache2/ssl.key/default-server.key'
673657
$php_version = '7'
674658
}
675-
$suphp_configpath = "/etc/php${php_version}/apache2"
676659
$ssl_sessioncache = '/var/lib/apache2/ssl_scache(512000)'
677-
$suphp_addhandler = 'x-httpd-php'
678-
$suphp_engine = 'off'
679660
if versioncmp($facts['os']['release']['major'], '11') < 0 or versioncmp($facts['os']['release']['major'], '12') >= 0 {
680661
$mod_packages = {
681662
'auth_kerb' => 'apache2-mod_auth_kerb',

manifests/vhost.pp

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,66 +1154,6 @@
11541154
# Allows the spcification of user and group execution privileges for CGI programs through
11551155
# inclusion of the `mod_suexec` module.
11561156
#
1157-
# @param suphp_addhandler
1158-
# Sets up a virtual host with [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG)
1159-
# working together with suphp_configpath and suphp_engine.<br />
1160-
# An example virtual host configuration with suPHP:
1161-
# ``` puppet
1162-
# apache::vhost { 'suphp.example.com':
1163-
# port => '80',
1164-
# docroot => '/home/appuser/myphpapp',
1165-
# suphp_addhandler => 'x-httpd-php',
1166-
# suphp_engine => 'on',
1167-
# suphp_configpath => '/etc/php5/apache2',
1168-
# directories => [
1169-
# {
1170-
# 'path' => '/home/appuser/myphpapp',
1171-
# 'suphp' => { user => 'myappuser', group => 'myappgroup' },
1172-
# },
1173-
# ],
1174-
# }
1175-
# ```
1176-
#
1177-
# @param suphp_configpath
1178-
# Sets up a virtual host with [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG)
1179-
# working together with suphp_addhandler and suphp_engine.<br />
1180-
# An example virtual host configuration with suPHP:
1181-
# ``` puppet
1182-
# apache::vhost { 'suphp.example.com':
1183-
# port => '80',
1184-
# docroot => '/home/appuser/myphpapp',
1185-
# suphp_addhandler => 'x-httpd-php',
1186-
# suphp_engine => 'on',
1187-
# suphp_configpath => '/etc/php5/apache2',
1188-
# directories => [
1189-
# {
1190-
# 'path' => '/home/appuser/myphpapp',
1191-
# 'suphp' => { user => 'myappuser', group => 'myappgroup' },
1192-
# },
1193-
# ],
1194-
# }
1195-
# ```
1196-
#
1197-
# @param suphp_engine
1198-
# Sets up a virtual host with [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG)
1199-
# working together with suphp_configpath and suphp_addhandler.<br />
1200-
# An example virtual host configuration with suPHP:
1201-
# ``` puppet
1202-
# apache::vhost { 'suphp.example.com':
1203-
# port => '80',
1204-
# docroot => '/home/appuser/myphpapp',
1205-
# suphp_addhandler => 'x-httpd-php',
1206-
# suphp_engine => 'on',
1207-
# suphp_configpath => '/etc/php5/apache2',
1208-
# directories => [
1209-
# {
1210-
# 'path' => '/home/appuser/myphpapp',
1211-
# 'suphp' => { user => 'myappuser', group => 'myappgroup' },
1212-
# },
1213-
# ],
1214-
# }
1215-
# ```
1216-
#
12171157
# @param vhost_name
12181158
# Enables name-based virtual hosting. If no IP is passed to the virtual host, but the
12191159
# virtual host is assigned a port, then the virtual host name is `vhost_name:port`.
@@ -1849,9 +1789,6 @@
18491789
Optional[Variant[Array[Hash],Hash]] $proxy_pass = undef,
18501790
Optional[Variant[Array[Hash],Hash]] $proxy_pass_match = undef,
18511791
Boolean $proxy_requests = false,
1852-
String $suphp_addhandler = $apache::params::suphp_addhandler,
1853-
Enum['on', 'off'] $suphp_engine = $apache::params::suphp_engine,
1854-
Optional[String] $suphp_configpath = $apache::params::suphp_configpath,
18551792
Hash $php_flags = {},
18561793
Hash $php_values = {},
18571794
Variant[Array[String],Hash] $php_admin_flags = {},
@@ -2365,7 +2302,6 @@
23652302
# - $_directories
23662303
# - $docroot
23672304
# - $apache_version
2368-
# - $suphp_engine
23692305
# - $shibboleth_enabled
23702306
if $_directories and ! empty($_directories) and $ensure == 'present' {
23712307
$_directories.each |Hash $directory| {
@@ -2693,18 +2629,6 @@
26932629
}
26942630
}
26952631

2696-
# Template uses:
2697-
# - $suphp_engine
2698-
# - $suphp_addhandler
2699-
# - $suphp_configpath
2700-
if $suphp_engine == 'on' {
2701-
concat::fragment { "${name}-suphp":
2702-
target => "${priority_real}${filename}.conf",
2703-
order => 240,
2704-
content => template('apache/vhost/_suphp.erb'),
2705-
}
2706-
}
2707-
27082632
# Template uses:
27092633
# - $php_values
27102634
# - $php_flags

spec/acceptance/vhost_spec.rb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,29 +1082,6 @@ class { 'apache': }
10821082
end
10831083
end
10841084

1085-
describe 'suphp' do
1086-
pp = <<-MANIFEST
1087-
class { 'apache': service_ensure => stopped, }
1088-
host { 'test.server': ip => '127.0.0.1' }
1089-
apache::vhost { 'test.server':
1090-
docroot => '/tmp',
1091-
suphp_addhandler => '#{apache_hash['suphp_handler']}',
1092-
suphp_engine => 'on',
1093-
suphp_configpath => '#{apache_hash['suphp_configpath']}',
1094-
}
1095-
MANIFEST
1096-
it 'applies cleanly' do
1097-
apply_manifest(pp, catch_failures: true)
1098-
end
1099-
1100-
describe file("#{apache_hash['vhost_dir']}/25-test.server.conf") do
1101-
it { is_expected.to be_file }
1102-
it { is_expected.to contain "suPHP_AddHandler #{apache_hash['suphp_handler']}" }
1103-
it { is_expected.to contain 'suPHP_Engine on' }
1104-
it { is_expected.to contain "suPHP_ConfigPath \"#{apache_hash['suphp_configpath']}\"" }
1105-
end
1106-
end
1107-
11081085
describe 'directory rewrite rules' do
11091086
pp = <<-MANIFEST
11101087
class { 'apache': }

spec/classes/mod/suphp_spec.rb

Lines changed: 0 additions & 18 deletions
This file was deleted.

spec/defines/vhost_spec.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,6 @@
375375
},
376376
],
377377
'proxy_requests' => false,
378-
'suphp_addhandler' => 'foo',
379-
'suphp_engine' => 'on',
380-
'suphp_configpath' => '/var/www/html',
381378
'php_admin_flags' => ['foo', 'bar'],
382379
'php_admin_values' => ['true', 'false'],
383380
'no_proxy_uris' => '/foo',
@@ -777,7 +774,6 @@
777774
.with_content(%r{^\s+SSLProxyCipherSuite\s+HIGH$})
778775
.with_content(%r{^\s+SSLProxyProtocol\s+TLSv1.2$})
779776
}
780-
it { is_expected.to contain_concat__fragment('rspec.example.com-suphp') }
781777
it { is_expected.to contain_concat__fragment('rspec.example.com-php_admin') }
782778
it { is_expected.to contain_concat__fragment('rspec.example.com-header') }
783779
it {
@@ -1315,7 +1311,6 @@
13151311
it { is_expected.not_to contain_concat__fragment('rspec.example.com-setenv') }
13161312
it { is_expected.not_to contain_concat__fragment('rspec.example.com-ssl') }
13171313
it { is_expected.not_to contain_concat__fragment('rspec.example.com-sslproxy') }
1318-
it { is_expected.not_to contain_concat__fragment('rspec.example.com-suphp') }
13191314
it { is_expected.not_to contain_concat__fragment('rspec.example.com-php_admin') }
13201315
it { is_expected.not_to contain_concat__fragment('rspec.example.com-header') }
13211316
it { is_expected.not_to contain_concat__fragment('rspec.example.com-requestheader') }
@@ -1634,7 +1629,7 @@
16341629
end
16351630

16361631
[
1637-
'ensure', 'suphp_engine', 'ip_based', 'access_log', 'error_log',
1632+
'ensure', 'ip_based', 'access_log', 'error_log',
16381633
'ssl', 'default_vhost', 'ssl_proxyengine', 'rewrites', 'suexec_user_group',
16391634
'wsgi_script_alias', 'wsgi_daemon_process_options',
16401635
'wsgi_import_script_alias', 'itk', 'logroot_ensure', 'log_level',

spec/spec_helper_acceptance_local.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ def apache_settings_hash
100100
apache['service_name'] = 'httpd'
101101
apache['package_name'] = 'httpd'
102102
apache['error_log'] = 'error_log'
103-
apache['suphp_handler'] = 'php5-script'
104-
apache['suphp_configpath'] = 'undef'
105103
if operatingsystemrelease >= 8 && osfamily == 'redhat'
106104
apache['version'] = '2.4'
107105
apache['mod_dir'] = '/etc/httpd/conf.modules.d'
@@ -132,8 +130,6 @@ def apache_settings_hash
132130
apache['service_name'] = 'apache2'
133131
apache['package_name'] = 'apache2'
134132
apache['error_log'] = 'error.log'
135-
apache['suphp_handler'] = 'x-httpd-php'
136-
apache['suphp_configpath'] = '/etc/php5/apache2'
137133
apache['version'] = '2.4'
138134
apache['mod_ssl_dir'] = apache['mod_dir']
139135
when 'freebsd'

templates/mod/suphp.conf.erb

Lines changed: 0 additions & 19 deletions
This file was deleted.

templates/vhost/_directories.erb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,6 @@
347347
SSLVerifyDepth <%= directory['ssl_verify_depth'] %>
348348
<%- end -%>
349349
<%- end -%>
350-
<%- if directory['suphp'] and @suphp_engine == 'on' -%>
351-
suPHP_UserGroup <%= directory['suphp']['user'] %> <%= directory['suphp']['group'] %>
352-
<%- end -%>
353350
<%- if directory['fcgiwrapper'] -%>
354351
FcgidWrapper <%= directory['fcgiwrapper']['command'] %> <%= directory['fcgiwrapper']['suffix'] %> <%= directory['fcgiwrapper']['virtual'] %>
355352
<%- end -%>

templates/vhost/_suphp.erb

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)