Chef-solo apache2 install doesn't enable default site

Hello Guys,

I have been doing a full start from scratch all day chef series in order to
start the week with team members and eventually using it through opsworks.

I have an intermediate experience with ansible so I kind of have the big
picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com
http://gettingstartedwithchef.com/first-steps-with-chef.htmlI have
already managed to get into trouble. I am running this in vagrant with
trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant
box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the
sites-available folder and nothing in the sites-enabled folder. As at now I
have no idea as to how this happened. I wouldn’t want to start rolling out
my own virtuahost template because I really want to make sure I follow the
steps.

I might switch to another tutorial for the mean time but it will be useful
for my own sake to find out what happened and how to debug etc. I will be
grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on chef
is welcome.

Thanks in advance
Best Regards,

Hey Joseph,

If you look at the default recipe, you’ll notice that it actually deletes the default site. There’s an attribute that controls that.

On Jun 27, 2015, at 5:06 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hello Guys,

I have been doing a full start from scratch all day chef series in order to start the week with team members and eventually using it through opsworks.

I have an intermediate experience with ansible so I kind of have the big picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com I have already managed to get into trouble. I am running this in vagrant with trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the sites-available folder and nothing in the sites-enabled folder. As at now I have no idea as to how this happened. I wouldn’t want to start rolling out my own virtuahost template because I really want to make sure I follow the steps.

I might switch to another tutorial for the mean time but it will be useful for my own sake to find out what happened and how to debug etc. I will be grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on chef is welcome.

Thanks in advance
Best Regards,

Hello There,

Below are the modifications I did on my cookbook/phpapp/recipes/default.rb

include_recipe 'apache2’
include_recipe ‘apache2::default’

template “#{node[‘apache’][‘dir’]}/sites-available/default.conf” do
cookbook 'apache2’
source 'web_app.conf.erb’
owner 'root’
group node[‘apache’][‘root_group’]
mode ‘0644’

notifies :restart , ‘service[apache2]’

end

#web_app “default” do

#template ‘web_app.conf.erb’

#name ‘default’

server_name ‘localhost’

enable true

docroot ‘/var/www/html’

#end

apache_site ‘default’ do
enable true
end

It produces this output hosted on pastee.org https://pastee.org/h24qx .It
looks like it’s expecting to see the remaining variable passed to. In that
case I would like to ask if there isn’t any default variable mechanism in
vagrant.

Thanks in advance

On Sat, Jun 27, 2015 at 12:06 PM Joseph Djomeda joseph@djomeda.com wrote:

Hello Guys,

I have been doing a full start from scratch all day chef series in order
to start the week with team members and eventually using it through
opsworks.

I have an intermediate experience with ansible so I kind of have the big
picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com
http://gettingstartedwithchef.com/first-steps-with-chef.htmlI have
already managed to get into trouble. I am running this in vagrant with
trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant
box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the
sites-available folder and nothing in the sites-enabled folder. As at now I
have no idea as to how this happened. I wouldn’t want to start rolling out
my own virtuahost template because I really want to make sure I follow the
steps.

I might switch to another tutorial for the mean time but it will be useful
for my own sake to find out what happened and how to debug etc. I will be
grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on chef
is welcome.

Thanks in advance
Best Regards,

Hey Taylor,

Looks you are right, never mind, I scrolled down the tutorial and I could
do some steps of bringing up a virtualbox and resume from where I am stuck.
Setting up of the virtual host on the tutorial is not too far from things I
have attempted with web_app, I could not just understood that there should
be lots of parameters to cater for just for the default site.

Thanks

On Sat, Jun 27, 2015 at 2:22 PM Joseph Djomeda joseph@djomeda.com wrote:

Hello There,

Below are the modifications I did on my cookbook/phpapp/recipes/default.rb

include_recipe 'apache2’
include_recipe ‘apache2::default’

template “#{node[‘apache’][‘dir’]}/sites-available/default.conf” do
cookbook 'apache2’
source 'web_app.conf.erb’
owner 'root’
group node[‘apache’][‘root_group’]
mode ‘0644’

notifies :restart , ‘service[apache2]’

end

#web_app “default” do

#template ‘web_app.conf.erb’

#name ‘default’

server_name ‘localhost’

enable true

docroot ‘/var/www/html’

#end

apache_site ‘default’ do
enable true
end

It produces this output hosted on pastee.org https://pastee.org/h24qx
.It looks like it’s expecting to see the remaining variable passed to. In
that case I would like to ask if there isn’t any default variable mechanism
in vagrant.

Thanks in advance

On Sat, Jun 27, 2015 at 12:06 PM Joseph Djomeda joseph@djomeda.com
wrote:

Hello Guys,

I have been doing a full start from scratch all day chef series in order
to start the week with team members and eventually using it through
opsworks.

I have an intermediate experience with ansible so I kind of have the big
picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com
http://gettingstartedwithchef.com/first-steps-with-chef.htmlI have
already managed to get into trouble. I am running this in vagrant with
trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant
box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the
sites-available folder and nothing in the sites-enabled folder. As at now I
have no idea as to how this happened. I wouldn’t want to start rolling out
my own virtuahost template because I really want to make sure I follow the
steps.

I might switch to another tutorial for the mean time but it will be
useful for my own sake to find out what happened and how to debug etc. I
will be grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on
chef is welcome.

Thanks in advance
Best Regards,

We don’t enable the default site by default because it’s not good for production use - we attempt to make the cookbook defaults configure apache in a secure way.

On Jun 27, 2015, at 7:31 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hey Taylor,

Looks you are right, never mind, I scrolled down the tutorial and I could do some steps of bringing up a virtualbox and resume from where I am stuck. Setting up of the virtual host on the tutorial is not too far from things I have attempted with web_app, I could not just understood that there should be lots of parameters to cater for just for the default site.

Thanks

On Sat, Jun 27, 2015 at 2:22 PM Joseph Djomeda joseph@djomeda.com wrote:
Hello There,

Below are the modifications I did on my cookbook/phpapp/recipes/default.rb

include_recipe 'apache2’
include_recipe ‘apache2::default’

template “#{node[‘apache’][‘dir’]}/sites-available/default.conf” do
cookbook 'apache2’
source 'web_app.conf.erb’
owner 'root’
group node[‘apache’][‘root_group’]
mode ‘0644’

notifies :restart , ‘service[apache2]’

end

#web_app “default” do

#template ‘web_app.conf.erb’

#name ‘default’

server_name ‘localhost’

enable true

docroot ‘/var/www/html’

#end

apache_site ‘default’ do
enable true
end

It produces this output hosted on pastee.org .It looks like it’s expecting to see the remaining variable passed to. In that case I would like to ask if there isn’t any default variable mechanism in vagrant.

Thanks in advance

On Sat, Jun 27, 2015 at 12:06 PM Joseph Djomeda joseph@djomeda.com wrote:
Hello Guys,

I have been doing a full start from scratch all day chef series in order to start the week with team members and eventually using it through opsworks.

I have an intermediate experience with ansible so I kind of have the big picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com I have already managed to get into trouble. I am running this in vagrant with trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the sites-available folder and nothing in the sites-enabled folder. As at now I have no idea as to how this happened. I wouldn’t want to start rolling out my own virtuahost template because I really want to make sure I follow the steps.

I might switch to another tutorial for the mean time but it will be useful for my own sake to find out what happened and how to debug etc. I will be grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on chef is welcome.

Thanks in advance
Best Regards,

Hello Guys,

This is getting ridiculous as a simple tutorial is turning into a master
level assessment on chef :smiley: . I understood based on @Taylor’s explanations
and created a virtualhost on my own from the phpapp recipe/templates and
soon enough run to this issue : “Apache is running a threaded MPM, but
your PHP Module is not compiled to be threadsafe. You need to recompile
PHP. chef apache2 cookbook
” . No fully understanding what this means and
with a little google I got to understand that I should rather move away
from mod_php . So I downloaded the php-fpm cookbook from the community site
and replace php dependency from the metadata file and got this following
error put on pastee.org https://pastee.org/na94r

Nos it’s looking for libapache2-mod-fastcgi package. What’s the chef way of
solving problem like this? Add a repository to the apt/source.d/ to cater
for this need as I would have done it manually or there is another way?

Thanks for the help and explanations provided so far.

On Sat, Jun 27, 2015 at 6:38 PM Taylor Price tayworm@gmail.com wrote:

We don’t enable the default site by default because it’s not good for
production use - we attempt to make the cookbook defaults configure apache
in a secure way.

On Jun 27, 2015, at 7:31 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hey Taylor,

Looks you are right, never mind, I scrolled down the tutorial and I could
do some steps of bringing up a virtualbox and resume from where I am stuck.
Setting up of the virtual host on the tutorial is not too far from things I
have attempted with web_app, I could not just understood that there should
be lots of parameters to cater for just for the default site.

Thanks

On Sat, Jun 27, 2015 at 2:22 PM Joseph Djomeda joseph@djomeda.com wrote:

Hello There,

Below are the modifications I did on my cookbook/phpapp/recipes/default.rb

include_recipe 'apache2’
include_recipe ‘apache2::default’

template “#{node[‘apache’][‘dir’]}/sites-available/default.conf” do
cookbook 'apache2’
source 'web_app.conf.erb’
owner 'root’
group node[‘apache’][‘root_group’]
mode ‘0644’

notifies :restart , ‘service[apache2]’

end

#web_app “default” do

#template ‘web_app.conf.erb’

#name ‘default’

server_name ‘localhost’

enable true

docroot ‘/var/www/html’

#end

apache_site ‘default’ do
enable true
end

It produces this output hosted on pastee.org https://pastee.org/h24qx
.It looks like it’s expecting to see the remaining variable passed to. In
that case I would like to ask if there isn’t any default variable mechanism
in vagrant.

Thanks in advance

On Sat, Jun 27, 2015 at 12:06 PM Joseph Djomeda joseph@djomeda.com
wrote:

Hello Guys,

I have been doing a full start from scratch all day chef series in order
to start the week with team members and eventually using it through
opsworks.

I have an intermediate experience with ansible so I kind of have the big
picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com
http://gettingstartedwithchef.com/first-steps-with-chef.htmlI have
already managed to get into trouble. I am running this in vagrant with
trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant
box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the
sites-available folder and nothing in the sites-enabled folder. As at now I
have no idea as to how this happened. I wouldn’t want to start rolling out
my own virtuahost template because I really want to make sure I follow the
steps.

I might switch to another tutorial for the mean time but it will be
useful for my own sake to find out what happened and how to debug etc. I
will be grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on
chef is welcome.

Thanks in advance
Best Regards,

If you want to get mod_php working and enable the default site in apache
then you need to make an attributes files and put in some attributes for
your cookbook.

Create cookbook/phpapp/attributes/defaults.rb and put in the following:

default[‘apache’][‘mpm’] = 'prefork’
default[‘apache’][‘default_site_enabled’] = true

You also need to make sure the following is in the metadata.rb of your
phpapp cookbook.

depends ‘apache2’

Finally, for your knowledge:

The following statements in a recipe are equivalent. Specifying a cookbook
without :: translates to the default recipe.

include_recipe 'apache2’
include_recipe ‘apache2::default’

On Mon, Jun 29, 2015 at 2:10 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hello Guys,

This is getting ridiculous as a simple tutorial is turning into a master
level assessment on chef :smiley: . I understood based on @Taylor’s explanations
and created a virtualhost on my own from the phpapp recipe/templates and
soon enough run to this issue : “Apache is running a threaded MPM, but
your PHP Module is not compiled to be threadsafe. You need to recompile
PHP. chef apache2 cookbook
” . No fully understanding what this means and
with a little google I got to understand that I should rather move away
from mod_php . So I downloaded the php-fpm cookbook from the community site
and replace php dependency from the metadata file and got this following
error put on pastee.org https://pastee.org/na94r

Nos it’s looking for libapache2-mod-fastcgi package. What’s the chef way
of solving problem like this? Add a repository to the apt/source.d/ to
cater for this need as I would have done it manually or there is another
way?

Thanks for the help and explanations provided so far.

On Sat, Jun 27, 2015 at 6:38 PM Taylor Price tayworm@gmail.com wrote:

We don’t enable the default site by default because it’s not good for
production use - we attempt to make the cookbook defaults configure apache
in a secure way.

On Jun 27, 2015, at 7:31 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hey Taylor,

Looks you are right, never mind, I scrolled down the tutorial and I could
do some steps of bringing up a virtualbox and resume from where I am stuck.
Setting up of the virtual host on the tutorial is not too far from things I
have attempted with web_app, I could not just understood that there should
be lots of parameters to cater for just for the default site.

Thanks

On Sat, Jun 27, 2015 at 2:22 PM Joseph Djomeda joseph@djomeda.com
wrote:

Hello There,

Below are the modifications I did on my
cookbook/phpapp/recipes/default.rb

include_recipe 'apache2’
include_recipe ‘apache2::default’

template “#{node[‘apache’][‘dir’]}/sites-available/default.conf” do
cookbook 'apache2’
source 'web_app.conf.erb’
owner 'root’
group node[‘apache’][‘root_group’]
mode ‘0644’

notifies :restart , ‘service[apache2]’

end

#web_app “default” do

#template ‘web_app.conf.erb’

#name ‘default’

server_name ‘localhost’

enable true

docroot ‘/var/www/html’

#end

apache_site ‘default’ do
enable true
end

It produces this output hosted on pastee.org https://pastee.org/h24qx
.It looks like it’s expecting to see the remaining variable passed to. In
that case I would like to ask if there isn’t any default variable mechanism
in vagrant.

Thanks in advance

On Sat, Jun 27, 2015 at 12:06 PM Joseph Djomeda joseph@djomeda.com
wrote:

Hello Guys,

I have been doing a full start from scratch all day chef series in
order to start the week with team members and eventually using it through
opsworks.

I have an intermediate experience with ansible so I kind of have the
big picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com
http://gettingstartedwithchef.com/first-steps-with-chef.htmlI have
already managed to get into trouble. I am running this in vagrant with
trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant
box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the
sites-available folder and nothing in the sites-enabled folder. As at now I
have no idea as to how this happened. I wouldn’t want to start rolling out
my own virtuahost template because I really want to make sure I follow the
steps.

I might switch to another tutorial for the mean time but it will be
useful for my own sake to find out what happened and how to debug etc. I
will be grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on
chef is welcome.

Thanks in advance
Best Regards,


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

If you’re on Linux, you should look into the httpd cookbook.

Usage examples in test/

https://github.com/chef-cookbooks/httpd/tree/master/test/fixtures/cookbooks

-s

On Mon, Jun 29, 2015 at 1:20 PM, Yoshi Spendiff
yoshi.spendiff@indochino.com wrote:

If you want to get mod_php working and enable the default site in apache
then you need to make an attributes files and put in some attributes for
your cookbook.

Create cookbook/phpapp/attributes/defaults.rb and put in the following:

default[‘apache’][‘mpm’] = 'prefork’
default[‘apache’][‘default_site_enabled’] = true

You also need to make sure the following is in the metadata.rb of your
phpapp cookbook.

depends ‘apache2’

Finally, for your knowledge:

The following statements in a recipe are equivalent. Specifying a cookbook
without :: translates to the default recipe.

include_recipe 'apache2’
include_recipe ‘apache2::default’

On Mon, Jun 29, 2015 at 2:10 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hello Guys,

This is getting ridiculous as a simple tutorial is turning into a master
level assessment on chef :smiley: . I understood based on @Taylor’s explanations
and created a virtualhost on my own from the phpapp recipe/templates and
soon enough run to this issue : “Apache is running a threaded MPM, but your
PHP Module is not compiled to be threadsafe. You need to recompile PHP.
chef apache2 cookbook” . No fully understanding what this means and with a
little google I got to understand that I should rather move away from
mod_php . So I downloaded the php-fpm cookbook from the community site and
replace php dependency from the metadata file and got this following error
put on pastee.org

Nos it’s looking for libapache2-mod-fastcgi package. What’s the chef way
of solving problem like this? Add a repository to the apt/source.d/ to cater
for this need as I would have done it manually or there is another way?

Thanks for the help and explanations provided so far.

On Sat, Jun 27, 2015 at 6:38 PM Taylor Price tayworm@gmail.com wrote:

We don’t enable the default site by default because it’s not good for
production use - we attempt to make the cookbook defaults configure apache
in a secure way.

On Jun 27, 2015, at 7:31 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hey Taylor,

Looks you are right, never mind, I scrolled down the tutorial and I could
do some steps of bringing up a virtualbox and resume from where I am stuck.
Setting up of the virtual host on the tutorial is not too far from things I
have attempted with web_app, I could not just understood that there should
be lots of parameters to cater for just for the default site.

Thanks

On Sat, Jun 27, 2015 at 2:22 PM Joseph Djomeda joseph@djomeda.com
wrote:

Hello There,

Below are the modifications I did on my
cookbook/phpapp/recipes/default.rb

include_recipe 'apache2’
include_recipe ‘apache2::default’

template “#{node[‘apache’][‘dir’]}/sites-available/default.conf” do
cookbook 'apache2’
source 'web_app.conf.erb’
owner 'root’
group node[‘apache’][‘root_group’]
mode ‘0644’

notifies :restart , ‘service[apache2]’

end

#web_app “default” do

#template ‘web_app.conf.erb’

#name ‘default’

server_name ‘localhost’

enable true

docroot ‘/var/www/html’

#end

apache_site ‘default’ do
enable true
end

It produces this output hosted on pastee.org .It looks like it’s
expecting to see the remaining variable passed to. In that case I would like
to ask if there isn’t any default variable mechanism in vagrant.

Thanks in advance

On Sat, Jun 27, 2015 at 12:06 PM Joseph Djomeda joseph@djomeda.com
wrote:

Hello Guys,

I have been doing a full start from scratch all day chef series in
order to start the week with team members and eventually using it through
opsworks.

I have an intermediate experience with ansible so I kind of have the
big picture with configuration management.

I started with a very modest article from gettingstartedwithchef.com I
have already managed to get into trouble. I am running this in vagrant with
trusty. I have 2 interfaces Nat and hostonly so I can talk to the vagrant
box via it own IP.

My recipe/default.rb really has :
include_recipe ‘apache2’

apache_site ‘default’ do
enable true
end

What I have noticed is that there is only default-ssl.conf in the
sites-available folder and nothing in the sites-enabled folder. As at now I
have no idea as to how this happened. I wouldn’t want to start rolling out
my own virtuahost template because I really want to make sure I follow the
steps.

I might switch to another tutorial for the mean time but it will be
useful for my own sake to find out what happened and how to debug etc. I
will be grateful if anybody and land a hand.

In the meantime any other updated and useful step by step resource on
chef is welcome.

Thanks in advance
Best Regards,


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

On Mon, Jun 29, 2015 at 2:10 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hello Guys,

This is getting ridiculous as a simple tutorial is turning into a master
level assessment on chef :smiley: . I understood based on @Taylor’s explanations
and created a virtualhost on my own from the phpapp recipe/templates and
soon enough run to this issue : “Apache is running a threaded MPM, but
your PHP Module is not compiled to be threadsafe. You need to recompile
PHP. chef apache2 cookbook
” . No fully understanding what this means and
with a little google I got to understand that I should rather move away
from mod_php . So I downloaded the php-fpm cookbook from the community site
and replace php dependency from the metadata file and got this following
error put on pastee.org https://pastee.org/na94r

Nos it’s looking for libapache2-mod-fastcgi package. What’s the chef way
of solving problem like this? Add a repository to the apt/source.d/ to
cater for this need as I would have done it manually or there is another
way?

I think a big part of the challenge is that the apache httpd 2.4 has
changed significantly, since those tutorials got written. I think it would
be good to do an update on those tutorials that match to the latest version
of the apache2 cookbook. As maintainer of the cookbook, I would love to see
this, but I simply have not had the time to do this.

We currently do have a test case that installs the prefork MPM with
mod_php5, but it is definitely a bit of work to configure. Maybe the best
thing to do here would be to create a sample wrapper cookbook (similar to
apache2_test) that can be referenced directly.

You can also find us on Gitter if you have any specific questions or have
an interest in helping out. https://gitter.im/svanzoest-cookbooks/apache2

– Sander

Hello All,

I think I really like here with everyone trying to help. It feels great. I
have not been lazy either. I think I pull it off sticking with php-fpm
deployment, you can actually have a look here http://pastie.org/10266158
maybe few pointers my improve my understanding of chef.

I will now look into Yoshi’s suggestion. I am might end up doing the same
tutorial with both approach , mod_php and mod_facgi and maybe release my
own tutorial of chef+ apache2+php-fpm+mysql

Thanks for all the support, really appreciated.

On Mon, Jun 29, 2015 at 11:01 PM Sander van Zoest sander@vanzoest.com
wrote:

On Mon, Jun 29, 2015 at 2:10 AM, Joseph Djomeda joseph@djomeda.com
wrote:

Hello Guys,

This is getting ridiculous as a simple tutorial is turning into a master
level assessment on chef :smiley: . I understood based on @Taylor’s explanations
and created a virtualhost on my own from the phpapp recipe/templates and
soon enough run to this issue : “Apache is running a threaded MPM, but
your PHP Module is not compiled to be threadsafe. You need to recompile
PHP. chef apache2 cookbook
” . No fully understanding what this means
and with a little google I got to understand that I should rather move away
from mod_php . So I downloaded the php-fpm cookbook from the community site
and replace php dependency from the metadata file and got this following
error put on pastee.org https://pastee.org/na94r

Nos it’s looking for libapache2-mod-fastcgi package. What’s the chef way
of solving problem like this? Add a repository to the apt/source.d/ to
cater for this need as I would have done it manually or there is another
way?

I think a big part of the challenge is that the apache httpd 2.4 has
changed significantly, since those tutorials got written. I think it would
be good to do an update on those tutorials that match to the latest version
of the apache2 cookbook. As maintainer of the cookbook, I would love to see
this, but I simply have not had the time to do this.

We currently do have a test case that installs the prefork MPM with
mod_php5, but it is definitely a bit of work to configure. Maybe the best
thing to do here would be to create a sample wrapper cookbook (similar to
apache2_test) that can be referenced directly.

You can also find us on Gitter if you have any specific questions or have
an interest in helping out. https://gitter.im/svanzoest-cookbooks/apache2

– Sander


Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves…

It’s a good community, you’ll start to see the same faces all over the
place.

On Tue, Jun 30, 2015 at 6:17 AM, Joseph Djomeda joseph@djomeda.com wrote:

Hello All,

I think I really like here with everyone trying to help. It feels great. I
have not been lazy either. I think I pull it off sticking with php-fpm
deployment, you can actually have a look here http://pastie.org/10266158
maybe few pointers my improve my understanding of chef.

I will now look into Yoshi’s suggestion. I am might end up doing the same
tutorial with both approach , mod_php and mod_facgi and maybe release my
own tutorial of chef+ apache2+php-fpm+mysql

Thanks for all the support, really appreciated.

On Mon, Jun 29, 2015 at 11:01 PM Sander van Zoest sander@vanzoest.com
wrote:

On Mon, Jun 29, 2015 at 2:10 AM, Joseph Djomeda joseph@djomeda.com
wrote:

Hello Guys,

This is getting ridiculous as a simple tutorial is turning into a master
level assessment on chef :smiley: . I understood based on @Taylor’s explanations
and created a virtualhost on my own from the phpapp recipe/templates and
soon enough run to this issue : “Apache is running a threaded MPM, but
your PHP Module is not compiled to be threadsafe. You need to recompile
PHP. chef apache2 cookbook
” . No fully understanding what this means
and with a little google I got to understand that I should rather move away
from mod_php . So I downloaded the php-fpm cookbook from the community site
and replace php dependency from the metadata file and got this following
error put on pastee.org https://pastee.org/na94r

Nos it’s looking for libapache2-mod-fastcgi package. What’s the chef way
of solving problem like this? Add a repository to the apt/source.d/ to
cater for this need as I would have done it manually or there is another
way?

I think a big part of the challenge is that the apache httpd 2.4 has
changed significantly, since those tutorials got written. I think it would
be good to do an update on those tutorials that match to the latest version
of the apache2 cookbook. As maintainer of the cookbook, I would love to see
this, but I simply have not had the time to do this.

We currently do have a test case that installs the prefork MPM with
mod_php5, but it is definitely a bit of work to configure. Maybe the best
thing to do here would be to create a sample wrapper cookbook (similar to
apache2_test) that can be referenced directly.

You can also find us on Gitter if you have any specific questions or have
an interest in helping out. https://gitter.im/svanzoest-cookbooks/apache2

– Sander


Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves…


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com