Skip to content

Commit

Permalink
Allow custom extensions for php handler
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierleune authored and hunner committed May 1, 2014
1 parent 82e3de9 commit c647db0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions manifests/mod/php.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
$package_name = undef,
$package_ensure = 'present',
$path = undef,
$extensions = ['.php'],
) {
if ! defined(Class['apache::mod::prefork']) {
fail('apache::mod::php requires apache::mod::prefork; please enable mpm_module => \'prefork\' on Class[\'apache\']')
}
validate_array($extensions)
::apache::mod { 'php5':
package => $package_name,
package_ensure => $package_ensure,
Expand Down
2 changes: 1 addition & 1 deletion templates/mod/php5.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddHandler php5-script <%= @extensions.join(' ') %>
AddType text/html .php

#
Expand Down

0 comments on commit c647db0

Please sign in to comment.