Use `nginx` repository configs

This commit is contained in:
Kazuhiro MUSASHI 2019-11-03 13:41:09 +08:00 committed by Gitea
parent eddc0a517f
commit 494f16b4f8
2 changed files with 0 additions and 40 deletions

View File

@ -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'

View File

@ -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'