-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathapache2.rb
50 lines (42 loc) · 1.08 KB
/
apache2.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
execute 'systemctl daemon-reload' do
action :nothing
end
directory '/etc/systemd/system/apache2.service.d' do
mode '755'
owner 'root'
end
remote_file '/etc/systemd/system/apache2.service.d/override.conf' do
mode '644'
owner 'root'
notifies :run, 'execute[systemctl daemon-reload]'
notifies :restart, 'service[apache2]'
end
service 'apache2' do
action :nothing
end
remote_file '/var/www/git.ruby-lang.org/robots.txt' do
mode '644'
owner 'root'
end
remote_file '/etc/apache2/conf-available/cgit.conf' do
mode '644'
owner 'root'
notifies :reload, 'service[apache2]'
end
%w[git svn].each do |subdomain|
remote_file "/etc/apache2/sites-available/#{subdomain}.ruby-lang.org.conf" do
mode '644'
owner 'root'
notifies :reload, 'service[apache2]'
end
link "/etc/apache2/sites-enabled/#{subdomain}.ruby-lang.org.conf" do
to "../sites-available/#{subdomain}.ruby-lang.org.conf"
end
end
%w[ssl cgid].each do |mod|
%w[conf load].each do |ext|
link "/etc/apache2/mods-enabled/#{mod}.#{ext}" do
to "../mods-available/#{mod}.#{ext}"
end
end
end