<% @path = "/etc/nginx/rubber/tools/monit.conf" %> <% rubber_instances.each do |ic| %> location /monit_<%= ic.name %> { rewrite ^/monit_<%= ic.name %>/(.*) /$1 break; proxy_pass http://<%= ic.full_name %>:<%= rubber_env.monit_admin_port %>; } <% end %>