문제

I am using this Apache2 handling Puppet module

https://forge.puppetlabs.com/puppetlabs/apache

When I execute the following code, it successfully installs the virtual host, but it never enables the PHP5 module for Apache2. How do I enable it?

class { 'apache': 
    mpm_module => 'prefork',
}

apache::vhost { 'mysite':
    ...
    xyz
    ...
}

apache::mod { 'php5': }

I also tried to replace the line with:

apache::mod { 'php': }

but that didn't help. The php5 module doesn't get enabled. I have to enable it manually by running a2enmod php5. The documentation doesn't say much about this. Thanks!

도움이 되었습니까?

해결책

according to the README, the apache::mod type should only be used for modules that do not have a specific apache::mod:: class. This is not true for PHP, see another part of the same README. Therefor, the correct manifest would be

include apache::mod::php

These semi-official Puppet Labs modules are generally a good resource.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top