puppetlabs-apache prefork vs. worker

917 views
Skip to first unread message

Peter Berghold

unread,
Jul 10, 2014, 1:00:56 PM7/10/14
to puppet-users
Have a bit of frustration here:   I have a class I've written to install a vhost based Wordpress site on a server.  There will be serveral there. 

Since mod_php is needed I also need to install mod_prefork.

I invoke the apache class thusly:

       class {'apache':
                        default_mods => false
        } ->
        class { 'apache::mod::prefork': } ->
        class { 'apache::mod::php': } 

which to me means "don't load the worker mod but load apache2 then then load the next two modules. 

I get: 

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: May not include both apache::mod::prefork and apache::mod::worker on the same node at /etc/puppet/environments/production/modules/apache/manifests/mod/prefork.pp:20 on node mcadprod2.mca.sharkrivertech.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

which is not the result I expected.  What am I missing here?

--

Peter L. Berghold                       Salty....@gmail.com

http://blog.berghold.net

Hunter Haugen

unread,
Jul 10, 2014, 5:16:29 PM7/10/14
to puppet-users
I think the parameter you're looking for is https://github.com/puppetlabs/puppetlabs-apache/#mpm_module

So:

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



or if you need to provide the prefork module custom parameters:

class { 'apache':
  mpm_module => false,
}
class { 'apache::mod::prefork':
  startservers => '12',
}
class { 'apache::mod::php': }




-Hunter


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAArvnv2Xox6CpNoz0uuQiThT9YNE9mGa-Qr1Bww%2Bs4XjbTgoiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages