Skip to content
Browse files

nagios and munin vhost use 'default' instead of _default if set

  • Loading branch information...
1 parent 75e7ef9 commit c18eba56df378877814fa337bfead194a74ea2a1 @jtimberman jtimberman committed May 31, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 munin/templates/default/apache2.conf.erb
  2. +1 −1 nagios/templates/default/apache2.conf.erb
View
2 munin/templates/default/apache2.conf.erb
@@ -1,7 +1,7 @@
<VirtualHost *:80>
ServerAdmin ops@example.com
ServerName <%= node[:fqdn] %>
- ServerAlias munin munin.<%= node.chef_environment %>.<%= @public_domain %>
+ ServerAlias munin munin.<%= node.chef_environment =~ /_default/ ? "default" : node.chef_environment %>.<%= @public_domain %>
<% case node[:platform] -%>
<% when "arch" -%>
Alias /munin /srv/http/munin
View
2 nagios/templates/default/apache2.conf.erb
@@ -1,7 +1,7 @@
<VirtualHost *:80>
ServerAdmin <%= node[:nagios][:sysadmin_email] %>
ServerName <%= node[:fqdn] %>
- ServerAlias nagios nagios.<%= node.chef_environment%>.<%= @public_domain %>
+ ServerAlias nagios nagios.<%= node.chef_environment =~ /_default/ ? "default" : node.chef_environment%>.<%= @public_domain %>
DocumentRoot <%= node[:nagios][:docroot] %>
CustomLog /var/log/nagios3/apache_access.log combined
ErrorLog /var/log/nagios3/apache_error.log

0 comments on commit c18eba5

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