Use `nginx` repository configs
This commit is contained in:
parent
eddc0a517f
commit
494f16b4f8
|
@ -1,29 +1,3 @@
|
||||||
# Deploy the nginx configuration file:
|
|
||||||
remote_file '/etc/nginx/sites-available/blog' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Deploy cron tab configuration for nginx
|
|
||||||
remote_file '/etc/cron.d/blog' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Create link:
|
|
||||||
link '/etc/nginx/sites-enabled/blog' do
|
|
||||||
user 'root'
|
|
||||||
to '/etc/nginx/sites-available/blog'
|
|
||||||
|
|
||||||
notifies :restart, 'service[nginx]'
|
|
||||||
end
|
|
||||||
|
|
||||||
service 'nginx' do
|
|
||||||
action :nothing
|
|
||||||
end
|
|
||||||
|
|
||||||
# Create the nginx directory:
|
# Create the nginx directory:
|
||||||
directory '/var/www/blog' do
|
directory '/var/www/blog' do
|
||||||
owner 'www-data'
|
owner 'www-data'
|
||||||
|
|
|
@ -30,20 +30,6 @@ remote_file '/etc/nginx/nginx.conf' do
|
||||||
notifies :reload, 'service[nginx]'
|
notifies :reload, 'service[nginx]'
|
||||||
end
|
end
|
||||||
|
|
||||||
%w( default maintenance ).each do |conf|
|
|
||||||
remote_file "/etc/nginx/sites-available/#{conf}" do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
link '/etc/nginx/sites-enabled/default' do
|
|
||||||
to '/etc/nginx/sites-available/default'
|
|
||||||
|
|
||||||
notifies :reload, 'service[nginx]'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Log rotation setting:
|
# Log rotation setting:
|
||||||
remote_file '/etc/logrotate.d/nginx' do
|
remote_file '/etc/logrotate.d/nginx' do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
|
|
Loading…
Reference in New Issue