Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add attribute for nginx status port

  • Loading branch information...
commit 110915db67ec39b760174f2f91fc7e1354253547 1 parent 22bb740
@dwradcliffe dwradcliffe 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;

0 comments on commit 110915d

Please sign in to comment.
Something went wrong with that request. Please try again.