You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passes a list of hashes to the vhost to create Aliasor AliasMatch directives as per the [mod_alias documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
901
+
Passes a list of hashes to the vhost to create Alias, AliasMatch, ScriptAlias or ScriptAliasMatch directives as per the [mod_alias documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
902
902
903
903
```puppet
904
904
aliases => [
905
-
{ aliasmatch => '^/image/(.*)\.jpg$',
906
-
path => '/files/jpg.images/$1.jpg',
905
+
{ aliasmatch => '^/image/(.*)\.jpg$',
906
+
path => '/files/jpg.images/$1.jpg',
907
907
}
908
-
{ alias => '/image',
909
-
path => '/ftp/pub/image',
908
+
{ alias => '/image',
909
+
path => '/ftp/pub/image',
910
+
},
911
+
{ scriptaliasmatch => '^/cgi-bin(.*)',
912
+
path => '/usr/local/share/cgi-bin$1',
913
+
},
914
+
{ scriptalias => '/nagios/cgi-bin/',
915
+
path => '/usr/lib/nagios/cgi-bin/',
916
+
},
917
+
{ alias => '/nagios',
918
+
path => '/usr/share/nagios/html',
910
919
},
911
920
],
912
921
```
913
922
914
-
For `alias` and `aliasmatch` to work, each needs a corresponding context, such as '< Directory /path/to/directory>' or '<Location /path/to/directory>'. The Alias and AliasMatch directives are created in the order specified in the `aliases` parameter. As described in the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html), more specific `alias` or `aliasmatch` parameters should come before the more general ones to avoid shadowing.
923
+
For `alias`, `aliasmatch`, `scriptalias` and `scriptaliasmatch` to work, each needs a corresponding context, such as `<Directory /path/to/directory>` or `<Location /some/location/here>`. The directives are created in the order specified in the `aliases` parameter. As described in the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html), more specific `alias`, `aliasmatch`, `scriptalias` or `scriptaliasmatch` parameters should come before the more general ones to avoid shadowing.
924
+
925
+
*Note*: Using the `aliases` parameter is preferred over the `scriptaliases` parameter since here the order of the various alias directives among each other can be controlled precisely. 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 is often problematic, for example in case of Nagios.
915
926
916
927
*Note:* If `apache::mod::passenger` is loaded and `PassengerHighPerformance => true` is set, then Alias might have issues honoring the `PassengerEnabled => off` statement. See [this article](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) for details.
917
928
@@ -1266,6 +1277,8 @@ Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', for exa
1266
1277
1267
1278
#####`scriptaliases`
1268
1279
1280
+
*Note*: This parameter is deprecated in favour of the `aliases` parameter.
1281
+
1269
1282
Passes an array of hashes to the vhost to create either ScriptAlias or ScriptAliasMatch statements as per the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
0 commit comments