Skip to content

(CAT-1449) - Remove deprecated parameters for scriptaliases & passenger #2470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 1 addition & 177 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ mod-pagespeed-stable package. The module does however require that the package b
or be installable using the system's default package provider. You should ensure that this
pre-requisite is met or declaring `apache::mod::pagespeed` will cause the puppet run to fail.
* [`apache::mod::passenger`](#apache--mod--passenger): Installs `mod_pasenger`.
> **Note**: This module support Passenger 4.0.0 and higher.
* [`apache::mod::perl`](#apache--mod--perl): Installs `mod_perl`.
* [`apache::mod::peruser`](#apache--mod--peruser): Installs `mod_peruser`.
* [`apache::mod::php`](#apache--mod--php): Installs `mod_php`.
Expand Down Expand Up @@ -217,7 +218,6 @@ The following parameters are available in the `apache` class:
* [`default_ssl_key`](#-apache--default_ssl_key)
* [`default_ssl_reload_on_change`](#-apache--default_ssl_reload_on_change)
* [`default_ssl_vhost`](#-apache--default_ssl_vhost)
* [`default_type`](#-apache--default_type)
* [`default_vhost`](#-apache--default_vhost)
* [`dev_packages`](#-apache--dev_packages)
* [`docroot`](#-apache--docroot)
Expand Down Expand Up @@ -279,7 +279,6 @@ The following parameters are available in the `apache` class:
* [`limitreqfieldsize`](#-apache--limitreqfieldsize)
* [`limitreqline`](#-apache--limitreqline)
* [`ip`](#-apache--ip)
* [`purge_vdir`](#-apache--purge_vdir)
* [`conf_enabled`](#-apache--conf_enabled)
* [`vhost_enable_dir`](#-apache--vhost_enable_dir)
* [`manage_vhost_enable_dir`](#-apache--manage_vhost_enable_dir)
Expand Down Expand Up @@ -463,16 +462,6 @@ apache::vhost { 'default-ssl':

Default value: `false`

##### <a name="-apache--default_type"></a>`default_type`

Data type: `String`

_Apache 2.2 only_. Sets the MIME `content-type` sent if the server cannot otherwise
determine an appropriate `content-type`. This directive is deprecated in Apache 2.4 and
newer, and is only for backwards compatibility in configuration files.

Default value: `'none'`

##### <a name="-apache--default_vhost"></a>`default_vhost`

Data type: `Boolean`
Expand Down Expand Up @@ -1090,15 +1079,6 @@ Specifies the ip address

Default value: `undef`

##### <a name="-apache--purge_vdir"></a>`purge_vdir`

Data type: `Boolean`

Removes all other Apache configs and virtual hosts.<br />
> **Note**: This parameter is deprecated in favor of the `purge_configs` parameter.<br />

Default value: `false`

##### <a name="-apache--conf_enabled"></a>`conf_enabled`

Data type: `Optional[Stdlib::Absolutepath]`
Expand Down Expand Up @@ -4515,22 +4495,9 @@ The following parameters are available in the `apache::mod::passenger` class:
* [`passenger_use_global_queue`](#-apache--mod--passenger--passenger_use_global_queue)
* [`passenger_user`](#-apache--mod--passenger--passenger_user)
* [`passenger_user_switching`](#-apache--mod--passenger--passenger_user_switching)
* [`rack_auto_detect`](#-apache--mod--passenger--rack_auto_detect)
* [`rack_autodetect`](#-apache--mod--passenger--rack_autodetect)
* [`rack_base_uri`](#-apache--mod--passenger--rack_base_uri)
* [`rack_env`](#-apache--mod--passenger--rack_env)
* [`rails_allow_mod_rewrite`](#-apache--mod--passenger--rails_allow_mod_rewrite)
* [`rails_app_spawner_idle_time`](#-apache--mod--passenger--rails_app_spawner_idle_time)
* [`rails_auto_detect`](#-apache--mod--passenger--rails_auto_detect)
* [`rails_autodetect`](#-apache--mod--passenger--rails_autodetect)
* [`rails_base_uri`](#-apache--mod--passenger--rails_base_uri)
* [`rails_default_user`](#-apache--mod--passenger--rails_default_user)
* [`rails_env`](#-apache--mod--passenger--rails_env)
* [`rails_framework_spawner_idle_time`](#-apache--mod--passenger--rails_framework_spawner_idle_time)
* [`rails_ruby`](#-apache--mod--passenger--rails_ruby)
* [`rails_spawn_method`](#-apache--mod--passenger--rails_spawn_method)
* [`rails_user_switching`](#-apache--mod--passenger--rails_user_switching)
* [`wsgi_auto_detect`](#-apache--mod--passenger--wsgi_auto_detect)

##### <a name="-apache--mod--passenger--manage_repo"></a>`manage_repo`

Expand Down Expand Up @@ -5179,30 +5146,6 @@ Toggles whether to attempt to enable user account sandboxing, also known as user

Default value: `undef`

##### <a name="-apache--mod--passenger--rack_auto_detect"></a>`rack_auto_detect`

Data type: `Optional[String]`

This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.

Default value: `undef`

##### <a name="-apache--mod--passenger--rack_autodetect"></a>`rack_autodetect`

Data type: `Optional[String]`

This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.

Default value: `undef`

##### <a name="-apache--mod--passenger--rack_base_uri"></a>`rack_base_uri`

Data type: `Optional[String]`

Deprecated in 3.0.0 in favor of PassengerBaseURI.

Default value: `undef`

##### <a name="-apache--mod--passenger--rack_env"></a>`rack_env`

Data type: `Optional[String]`
Expand All @@ -5211,54 +5154,6 @@ Alias for PassengerAppEnv.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_allow_mod_rewrite"></a>`rails_allow_mod_rewrite`

Data type: `Optional[String]`

This option doesn't do anything anymore since version 4.0.0.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_app_spawner_idle_time"></a>`rails_app_spawner_idle_time`

Data type: `Optional[String]`

This option has been removed in version 4.0.0, and replaced with PassengerMaxPreloaderIdleTime.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_auto_detect"></a>`rails_auto_detect`

Data type: `Optional[String]`

This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_autodetect"></a>`rails_autodetect`

Data type: `Optional[String]`

This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_base_uri"></a>`rails_base_uri`

Data type: `Optional[String]`

Deprecated in 3.0.0 in favor of PassengerBaseURI.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_default_user"></a>`rails_default_user`

Data type: `Optional[String]`

Deprecated in 3.0.0 in favor of PassengerDefaultUser

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_env"></a>`rails_env`

Data type: `Optional[String]`
Expand All @@ -5276,38 +5171,6 @@ altogether. You should use smart spawning instead.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_ruby"></a>`rails_ruby`

Data type: `Optional[String]`

Deprecated in 3.0.0 in favor of PassengerRuby.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_spawn_method"></a>`rails_spawn_method`

Data type: `Optional[String]`

Deprecated in 3.0.0 in favor of PassengerSpawnMethod.

Default value: `undef`

##### <a name="-apache--mod--passenger--rails_user_switching"></a>`rails_user_switching`

Data type: `Optional[String]`

Deprecated in 3.0.0 in favor of PassengerUserSwitching.

Default value: `undef`

##### <a name="-apache--mod--passenger--wsgi_auto_detect"></a>`wsgi_auto_detect`

Data type: `Optional[String]`

This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.

Default value: `undef`

### <a name="apache--mod--perl"></a>`apache::mod::perl`

Installs `mod_perl`.
Expand Down Expand Up @@ -7753,7 +7616,6 @@ The following parameters are available in the `apache::vhost` defined type:
* [`rewrite_cond`](#-apache--vhost--rewrite_cond)
* [`rewrite_inherit`](#-apache--vhost--rewrite_inherit)
* [`scriptalias`](#-apache--vhost--scriptalias)
* [`scriptaliases`](#-apache--vhost--scriptaliases)
* [`serveradmin`](#-apache--vhost--serveradmin)
* [`serveraliases`](#-apache--vhost--serveraliases)
* [`servername`](#-apache--vhost--servername)
Expand Down Expand Up @@ -7947,11 +7809,6 @@ a corresponding context, such as `<Directory /path/to/directory>` or
the `aliases` parameter. As described in the `mod_alias` documentation, add more specific
`alias`, `aliasmatch`, `scriptalias` or `scriptaliasmatch` parameters before the more
general ones to avoid shadowing.<BR />
> **Note**: Use the `aliases` parameter instead of the `scriptaliases` parameter because
you can precisely control the order of various alias directives. Defining `ScriptAliases`
using the `scriptaliases` parameter means *all* `ScriptAlias` directives will come after
*all* `Alias` directives, which can lead to `Alias` directives shadowing `ScriptAlias`
directives. This often causes problems; for example, this could cause problems with Nagios.<BR />
If `apache::mod::passenger` is loaded and `PassengerHighPerformance` is `true`, the `Alias`
directive might not be able to honor the `PassengerEnabled => off` statement. See
[this article](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) for details.
Expand Down Expand Up @@ -9761,39 +9618,6 @@ Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', such as

Default value: `undef`

##### <a name="-apache--vhost--scriptaliases"></a>`scriptaliases`

Data type: `Array[Hash]`

> **Note**: This parameter is deprecated in favor of the `aliases` parameter.<br />
Passes an array of hashes to the virtual host to create either ScriptAlias or
ScriptAliasMatch statements per the `mod_alias` documentation.
``` puppet
scriptaliases => [
{
alias => '/myscript',
path => '/usr/share/myscript',
},
{
aliasmatch => '^/foo(.*)',
path => '/usr/share/fooscripts$1',
},
{
aliasmatch => '^/bar/(.*)',
path => '/usr/share/bar/wrapper.sh/$1',
},
{
alias => '/neatscript',
path => '/usr/share/neatscript',
},
]
```
The ScriptAlias and ScriptAliasMatch directives are created in the order specified.
As with [Alias and AliasMatch](#aliases) directives, specify more specific aliases
before more general ones to avoid shadowing.

Default value: `[]`

##### <a name="-apache--vhost--serveradmin"></a>`serveradmin`

Data type: `Optional[String]`
Expand Down
29 changes: 5 additions & 24 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@
# ```
# **Note**: SSL virtual hosts only respond to HTTPS queries.
#
# @param default_type
# _Apache 2.2 only_. Sets the MIME `content-type` sent if the server cannot otherwise
# determine an appropriate `content-type`. This directive is deprecated in Apache 2.4 and
# newer, and is only for backwards compatibility in configuration files.
#
# @param default_vhost
# Configures a default virtual host when the class is declared.<br />
# To configure customized virtual hosts, set this parameter's
Expand Down Expand Up @@ -423,10 +418,6 @@
#
# @param ip
# Specifies the ip address
#
# @param purge_vdir
# Removes all other Apache configs and virtual hosts.<br />
# > **Note**: This parameter is deprecated in favor of the `purge_configs` parameter.<br />
#
# @param conf_enabled
# Whether the additional config files in `/etc/apache2/conf-enabled` should be managed.
Expand Down Expand Up @@ -472,7 +463,6 @@
Optional[Stdlib::Absolutepath] $default_ssl_crl = undef,
Optional[String] $default_ssl_crl_check = undef,
Boolean $default_ssl_reload_on_change = false,
String $default_type = 'none',
Optional[Variant[Array, String]] $dev_packages = $apache::params::dev_packages,
Optional[String] $ip = undef,
Boolean $service_enable = true,
Expand All @@ -481,7 +471,6 @@
Optional[String] $service_restart = undef,
Boolean $purge_configs = true,
Optional[Boolean] $purge_vhost_dir = undef,
Boolean $purge_vdir = false,
Optional[String[1]] $serveradmin = undef,
Apache::OnOff $sendfile = 'On',
Optional[Apache::OnOff] $ldap_verify_server_cert = undef,
Expand Down Expand Up @@ -599,17 +588,9 @@
service_restart => $service_restart,
}

# Deprecated backwards-compatibility
if $purge_vdir {
warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs')
$purge_confd = $purge_vdir
} else {
$purge_confd = $purge_configs
}

# Set purge vhostd appropriately
if $purge_vhost_dir == undef {
$purge_vhostd = $purge_confd
$purge_vhostd = $purge_configs
} else {
$purge_vhostd = $purge_vhost_dir
}
Expand All @@ -627,8 +608,8 @@
file { $confd_dir:
ensure => directory,
recurse => true,
purge => $purge_confd,
force => $purge_confd,
purge => $purge_configs,
force => $purge_configs,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
Expand All @@ -637,8 +618,8 @@
file { $conf_enabled:
ensure => directory,
recurse => true,
purge => $purge_confd,
force => $purge_confd,
purge => $purge_configs,
force => $purge_configs,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
Expand Down
Loading