puppetlabs/apache pidfile location

asked 2015-03-10 09:05:40 -0600

bashilbers gravatar image

I have a very basic puppet setup:

class { 'apache':
    default_vhost => false,
    logroot       => '/logs',
    require       => File['/logs']

include apache::mod::php

apache::vhost { 'dev.adchieve.com':
    port    => 8081,
    docroot => '/www/web',
    require => File['/www/web']

(i'm on centos 6.4 btw)

Now, puppetlabs/apache uses a temlate for /etc/httpd/conf/httpd.conf and the pidfile location is dynamic, as can be seen here: https://github.com/puppetlabs/puppetlabs-apache/blob/master/templates/httpd.conf.erb#L8

This dynamic value is determined in the module's init.pp, https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/init.pp#L255

Now, after I let vagrant provision my machine, look at /sysconfig/subsys (left) and /etc/httpd/conf/httpd.cof:

image description

There's a mismatch in pidfile location, that's why my apache is unable to start (telling me about locking etc..)

How can I change the pidfile location in apache's httpd.conf file via puppet so that it is matching with sysconfig?

edit retag flag offensive close merge delete


What error do you see when you try to start? I have a redhat 6 http server (not puppet apache managed) that appears to have the same pid values in /etc/httpd/conf/httpd.conf and /etc/sysconfig/httpd - it starts and runs just fine.

lorcutt gravatar imagelorcutt ( 2015-03-11 11:33:51 -0600 )edit