Skip to content

Instantly share code, notes, and snippets.

@tjl2
Created October 20, 2010 14:31
Show Gist options
  • Save tjl2/636530 to your computer and use it in GitHub Desktop.
Save tjl2/636530 to your computer and use it in GitHub Desktop.
Custom chef recipe for nginx rewrites
# Replace "appname" as appropriate for your environment
remote_file "/data/nginx/servers/appname.rewrites" do
owner node[:owner_name]
group node[:owner_name]
mode 0644
source "appname.rewrites"
backup false
action :create
end
if ['solo', 'app', 'app_master'].include?(node[:instance_role])
execute "nginx reload" do
command "/etc/init.d/nginx reload"
user "root"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment