Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3 from dwradcliffe/status-template

add attribute for nginx status port
  • Loading branch information...
commit c517b283efe32aa8f8727473ca959995cf77e889 2 parents 22bb740 + 110915d
@phlipper authored
View
1  attributes/default.rb
@@ -85,3 +85,4 @@
default["nginx"]["passenger_pool_idle_time"] = 300
default["nginx"]["enable_stub_status"] = true
+default["nginx"]["status_port"] = 80
View
5 recipes/configuration.rb
@@ -39,11 +39,12 @@
end
end
-cookbook_file "#{node["nginx"]["dir"]}/conf.d/nginx_status.conf" do
- source "nginx_status.conf"
+template "#{node["nginx"]["dir"]}/conf.d/nginx_status.conf" do
+ source "nginx_status.conf.erb"
owner "root"
group "root"
mode "0644"
notifies :restart, "service[nginx]", :immediately
+ variables( :port => node["nginx"]["status_port"] )
only_if { node["nginx"]["enable_stub_status"] }
end
View
2  files/default/nginx_status.conf → templates/default/nginx_status.conf.erb
@@ -1,6 +1,6 @@
# Nginx status
server {
- listen 127.0.0.1:80;
+ listen 127.0.0.1:<%= @port %>;
server_name localhost;
location /nginx_status {
stub_status on;
Please sign in to comment.
Something went wrong with that request. Please try again.