default[:apache][:event][:thread_limit] = 64
default[:apache][:event][:threads_per_child] = 25
default[:apache][:event][:max_requests_per_child] = 0
+
+default[:apache][:listen_address] = "*"
mode 0644
end
+template "/etc/apache2/ports.conf" do
+ source "ports.conf.erb"
+ owner "root"
+ group "root"
+ mode 0644
+end
+
service "apache2" do
action [ :enable, :start ]
supports :status => true, :restart => true, :reload => true
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+# Listen on port 80
+NameVirtualHost *:80
+Listen <%= node[:apache][:listen_address] %>:80
+
+# Listen on port 443 if mod_ssl is enabled
+<IfModule mod_ssl.c>
+ Listen <%= node[:apache][:listen_address] %>:443
+</IfModule>
+
+# Listen on port 443 if mod_gnutls is enabled
+<IfModule mod_gnutls.c>
+ Listen <%= node[:apache][:listen_address] %>:443
+</IfModule>