deprec 2.1.11 → 2.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/deprec/capistrano_extensions.rb +54 -53
- data/lib/deprec/recipes/app/passenger.rb +1 -1
- data/lib/deprec/recipes/db/sqlite.rb +11 -2
- data/lib/deprec/recipes/network.rb +1 -0
- data/lib/deprec/recipes/rails.rb +10 -32
- data/lib/deprec/recipes/ruby/ree.rb +5 -7
- data/lib/deprec/recipes/syslog_ng.rb +15 -1
- data/lib/deprec/recipes/web/apache.rb +5 -0
- data/lib/deprec/templates/apache/apache2.conf.erb +295 -0
- data/lib/deprec/templates/syslog_ng/syslog-ng.conf-client +7 -15
- data/lib/vmbuilder_plugins/gem.rb +1 -1
- metadata +4 -3
@@ -240,26 +240,26 @@ module Deprec2
|
|
240
240
|
mkdir(src_dir, :mode => 0775, :group => group_src, :via => :sudo)
|
241
241
|
end
|
242
242
|
|
243
|
-
# download source
|
244
|
-
def download_src(
|
245
|
-
|
243
|
+
# download source pkg if we don't already have it
|
244
|
+
def download_src(src_pkg, src_dir)
|
245
|
+
set_pkg_defaults(src_pkg)
|
246
246
|
create_src_dir
|
247
247
|
# check if file exists and if we have an MD5 hash or bytecount to compare
|
248
248
|
# against if so, compare and decide if we need to download again
|
249
|
-
if defined?(
|
250
|
-
md5_clause = " && echo '#{
|
249
|
+
if defined?(src_pkg[:md5sum])
|
250
|
+
md5_clause = " && echo '#{src_pkg[:md5sum]}' | md5sum -c - "
|
251
251
|
end
|
252
|
-
case
|
252
|
+
case src_pkg[:download_method]
|
253
253
|
# when getting source with git
|
254
254
|
when :git
|
255
255
|
# ensure git is installed
|
256
256
|
apt.install( {:base => %w(git-core)}, :stable) #TODO fix this to test ubuntu version <hardy might need specific git version for full git submodules support
|
257
|
-
|
258
|
-
run "if [ -d #{
|
257
|
+
pkg_dir = File.join(src_dir, src_pkg[:dir])
|
258
|
+
run "if [ -d #{pkg_dir} ]; then cd #{pkg_dir} && #{sudo} git checkout master && #{sudo} git pull && #{sudo} git submodule init && #{sudo} git submodule update; else #{sudo} git clone #{src_pkg[:url]} #{pkg_dir} && cd #{pkg_dir} && #{sudo} git submodule init && #{sudo} git submodule update ; fi"
|
259
259
|
# Checkout the revision wanted if defined
|
260
|
-
if
|
261
|
-
run "cd #{
|
262
|
-
run "cd #{
|
260
|
+
if src_pkg[:version]
|
261
|
+
run "cd #{pkg_dir} && git branch | grep '#{src_pkg[:version]}$' && #{sudo} git branch -D '#{src_pkg[:version]}'; exit 0"
|
262
|
+
run "cd #{pkg_dir} && #{sudo} git checkout -b #{src_pkg[:version]} #{src_pkg[:version]}"
|
263
263
|
end
|
264
264
|
|
265
265
|
# when getting source with wget
|
@@ -267,66 +267,67 @@ module Deprec2
|
|
267
267
|
# ensure wget is installed
|
268
268
|
apt.install( {:base => %w(wget)}, :stable )
|
269
269
|
# XXX replace with invoke_command
|
270
|
-
run "cd #{src_dir} && test -f #{
|
270
|
+
run "cd #{src_dir} && test -f #{src_pkg[:filename]} #{md5_clause} || #{sudo} wget --quiet --timestamping #{src_pkg[:url]}"
|
271
|
+
|
272
|
+
when :deb
|
273
|
+
run "cd #{src_dir} && test -f #{src_pkg[:filename]} #{md5_clause} || #{sudo} wget --quiet --timestamping #{src_pkg[:url]}"
|
274
|
+
|
271
275
|
else
|
272
|
-
puts "DOWNLOAD SRC: Download method not recognised.
|
276
|
+
puts "DOWNLOAD SRC: Download method not recognised. src_pkg[:download_method]: #{src_pkg[:download_method]}"
|
273
277
|
end
|
274
278
|
end
|
275
279
|
|
276
280
|
# unpack src and make it writable by the group
|
277
|
-
def unpack_src(
|
278
|
-
|
279
|
-
|
280
|
-
case
|
281
|
+
def unpack_src(src_pkg, src_dir)
|
282
|
+
set_pkg_defaults(src_pkg)
|
283
|
+
pkg_dir = File.join([src_dir, src_pkg[:dir]].compact)
|
284
|
+
case src_pkg[:download_method]
|
281
285
|
# when unpacking git sources - nothing to do
|
286
|
+
when :deb
|
287
|
+
puts "UNPACK SRC: nothing to do for deb installs"
|
282
288
|
when :git
|
283
289
|
puts "UNPACK SRC: nothing to do for git installs"
|
284
290
|
when :http
|
285
|
-
sudo
|
286
|
-
|
287
|
-
cd #{src_dir}
|
288
|
-
|
289
|
-
|
290
|
-
#{src_package[:unpack]}
|
291
|
-
'
|
292
|
-
EOF
|
291
|
+
run "test -d #{pkg_dir}.old && #{sudo} rm -fr #{pkg_dir}.old; exit 0"
|
292
|
+
run "test -d #{pkg_dir} && #{sudo} mv #{pkg_dir} #{pkg_dir}.old; exit 0"
|
293
|
+
run "cd #{src_dir} && #{sudo} #{src_pkg[:unpack]}" if src_pkg[:unpack] != ''
|
294
|
+
run "#{sudo} chgrp -R #{group} #{pkg_dir}"
|
295
|
+
run "#{sudo} chmod -R g+w #{pkg_dir}"
|
293
296
|
else
|
294
|
-
puts "UNPACK SRC: Download method not recognised.
|
297
|
+
puts "UNPACK SRC: Download method not recognised. src_pkg[:download_method]: #{src_pkg[:download_method]} "
|
295
298
|
end
|
296
|
-
sudo <<-EOF
|
297
|
-
bash -c '
|
298
|
-
cd #{src_dir};
|
299
|
-
chgrp -R #{group} #{package_dir};
|
300
|
-
chmod -R g+w #{package_dir};
|
301
|
-
'
|
302
|
-
EOF
|
303
299
|
end
|
304
300
|
|
305
|
-
def
|
301
|
+
def set_pkg_defaults(pkg)
|
306
302
|
pkg[:filename] ||= File.basename(pkg[:url])
|
307
|
-
pkg[:dir] ||= pkg[:filename].sub(/(\.tgz|\.tar\.gz)/,'')
|
308
303
|
pkg[:download_method] ||= :http
|
309
|
-
pkg[:
|
310
|
-
pkg[:
|
311
|
-
|
312
|
-
|
304
|
+
pkg[:post_install] ||= ''
|
305
|
+
case pkg[:download_method]
|
306
|
+
when :http
|
307
|
+
pkg[:dir] ||= pkg[:filename].sub(/(\.tgz|\.tar\.gz)/,'')
|
308
|
+
pkg[:unpack] ||= "tar zxf #{pkg[:filename]};"
|
309
|
+
pkg[:configure] ||= './configure ;'
|
310
|
+
pkg[:make] ||= 'make;'
|
311
|
+
pkg[:install] ||= 'make install;'
|
312
|
+
when :deb
|
313
|
+
pkg[:dir] ||= ''
|
314
|
+
pkg[:unpack] ||= ''
|
315
|
+
pkg[:configure] ||= ''
|
316
|
+
pkg[:make] ||= ''
|
317
|
+
pkg[:install] ||= "dpkg -i #{pkg[:filename]}"
|
318
|
+
end
|
313
319
|
end
|
314
320
|
|
315
|
-
# install
|
316
|
-
def install_from_src(
|
317
|
-
|
318
|
-
|
319
|
-
unpack_src(
|
321
|
+
# install pkg from source
|
322
|
+
def install_from_src(src_pkg, src_dir)
|
323
|
+
set_pkg_defaults(src_pkg)
|
324
|
+
pkg_dir = File.join([src_dir, src_pkg[:dir]].compact)
|
325
|
+
unpack_src(src_pkg, src_dir)
|
320
326
|
apt.install( {:base => %w(build-essential)}, :stable )
|
321
|
-
sudo
|
322
|
-
|
323
|
-
cd #{
|
324
|
-
#{
|
325
|
-
#{src_package[:make]}
|
326
|
-
#{src_package[:install]}
|
327
|
-
#{src_package[:post_install]}
|
328
|
-
'
|
329
|
-
SUDO
|
327
|
+
run "cd #{pkg_dir} && #{sudo} #{src_pkg[:configure]}" if src_pkg[:configure] != ''
|
328
|
+
run "cd #{pkg_dir} && #{sudo} #{src_pkg[:make]}" if src_pkg[:make] != ''
|
329
|
+
run "cd #{pkg_dir} && #{sudo} #{src_pkg[:install]}" if src_pkg[:install] != ''
|
330
|
+
run "cd #{pkg_dir} && #{sudo} #{src_pkg[:post_install]}" if src_pkg[:post_install] != ''
|
330
331
|
end
|
331
332
|
|
332
333
|
def read_database_yml
|
@@ -3,7 +3,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
namespace :deprec do
|
4
4
|
namespace :passenger do
|
5
5
|
|
6
|
-
set :passenger_version, '2.2.
|
6
|
+
set :passenger_version, '2.2.14'
|
7
7
|
set :passenger_install_dir, "/usr/local/lib/ruby/gems/1.8/gems/passenger-#{passenger_version}"
|
8
8
|
|
9
9
|
# Default settings for Passenger config files
|
@@ -3,15 +3,24 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
namespace :deprec do
|
4
4
|
namespace :sqlite do
|
5
5
|
|
6
|
+
SRC_PACKAGES[:sqlite] = {
|
7
|
+
:url => "http://www.sqlite.org/sqlite-amalgamation-3.7.2.tar.gz",
|
8
|
+
:md5sum => "bd9586208f48ba840467bcfd066a6fa9 sqlite-amalgamation-3.7.2.tar.gz",
|
9
|
+
:dir => 'sqlite-3.7.2'
|
10
|
+
}
|
11
|
+
|
12
|
+
|
6
13
|
desc "Install sqlite"
|
7
14
|
task :install, :roles => :db do
|
8
15
|
install_deps
|
16
|
+
deprec2.download_src(SRC_PACKAGES[:sqlite], src_dir)
|
17
|
+
deprec2.install_from_src(SRC_PACKAGES[:sqlite], src_dir)
|
9
18
|
gem2.install "sqlite3-ruby"
|
10
19
|
end
|
11
20
|
|
12
21
|
# install dependencies for nginx
|
13
22
|
task :install_deps, :roles => :db do
|
14
|
-
apt.install( {:base => %w(
|
23
|
+
# apt.install( {:base => %w(blah)}, :stable )
|
15
24
|
end
|
16
25
|
end
|
17
26
|
|
@@ -34,4 +43,4 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
34
43
|
end
|
35
44
|
|
36
45
|
end
|
37
|
-
end
|
46
|
+
end
|
@@ -101,6 +101,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
101
101
|
# XXX need to set the order for these as it breaks sudo currently
|
102
102
|
desc "Update system networking configuration"
|
103
103
|
task :config do
|
104
|
+
network_hostname # get user input upfront
|
104
105
|
SYSTEM_CONFIG_FILES[:network].values.each do |file|
|
105
106
|
deprec2.render_template(:network, file.merge(:remote=>true))
|
106
107
|
end
|
data/lib/deprec/recipes/rails.rb
CHANGED
@@ -43,21 +43,18 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
43
43
|
|
44
44
|
after :deploy, "deploy:cleanup"
|
45
45
|
|
46
|
-
namespace :rake do
|
47
|
-
namespace :gems do
|
48
|
-
task :install, :roles => :app do
|
49
|
-
run "cd #{current_path} && #{sudo} rake gems:install"
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
namespace :db do
|
54
|
-
task :migrate, :roles => :db do
|
55
|
-
run "cd #{current_path} && #{sudo} rake gems:install"
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
46
|
namespace :deprec do
|
60
47
|
namespace :rails do
|
48
|
+
|
49
|
+
task :install, :roles => :app do
|
50
|
+
install_deps
|
51
|
+
gem2.install 'rails'
|
52
|
+
gem2.install 'bundler'
|
53
|
+
end
|
54
|
+
|
55
|
+
task :install_deps do
|
56
|
+
apt.install( {:base => %w(libmysqlclient15-dev sqlite3 libsqlite3-ruby libsqlite3-dev libpq-dev)}, :stable )
|
57
|
+
end
|
61
58
|
|
62
59
|
#
|
63
60
|
# If database.yml is not kept in scm and it is present in local
|
@@ -76,25 +73,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
76
73
|
end
|
77
74
|
end
|
78
75
|
|
79
|
-
task :install, :roles => :app do
|
80
|
-
install_deps
|
81
|
-
install_gems
|
82
|
-
end
|
83
|
-
|
84
|
-
task :install_deps do
|
85
|
-
apt.install( {:base => %w(libmysqlclient15-dev sqlite3 libsqlite3-ruby libsqlite3-dev libpq-dev)}, :stable )
|
86
|
-
end
|
87
|
-
|
88
|
-
# install some required ruby gems
|
89
|
-
task :install_gems do
|
90
|
-
gem2.install 'sqlite3-ruby'
|
91
|
-
gem2.install 'mysql'
|
92
|
-
gem2.install 'ruby-pg'
|
93
|
-
gem2.install 'rails'
|
94
|
-
gem2.install 'rake'
|
95
|
-
gem2.install 'rspec'
|
96
|
-
end
|
97
|
-
|
98
76
|
desc <<-DESC
|
99
77
|
Install full rails stack on a stock standard ubuntu server (7.10, 8.04)
|
100
78
|
DESC
|
@@ -3,15 +3,12 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
3
3
|
namespace :deprec do
|
4
4
|
namespace :ree do
|
5
5
|
|
6
|
-
set :ree_version, 'ruby-enterprise-1.8.7-2010.02'
|
7
6
|
set :ree_install_dir, "/usr/local"
|
8
7
|
|
9
8
|
SRC_PACKAGES[:ree] = {
|
10
|
-
:md5sum => "
|
11
|
-
:url => "http://rubyforge.org/frs/download.php/
|
12
|
-
:
|
13
|
-
:make => '',
|
14
|
-
:install => "./installer --auto #{ree_install_dir}"
|
9
|
+
:md5sum => "0eaff4bcd0bc9fa310c593be7ae33937 ruby-enterprise_1.8.7-2010.02_amd64_ubuntu8.04.deb",
|
10
|
+
:url => "http://rubyforge.org/frs/download.php/71097/ruby-enterprise_1.8.7-2010.02_amd64_ubuntu8.04.deb",
|
11
|
+
:download_method => :deb
|
15
12
|
}
|
16
13
|
|
17
14
|
task :install do
|
@@ -22,7 +19,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
22
19
|
end
|
23
20
|
|
24
21
|
task :install_deps do
|
25
|
-
|
22
|
+
# not required with new dev package?
|
23
|
+
# apt.install({:base => %w(libssl-dev libmysqlclient15-dev libreadline5-dev)}, :stable)
|
26
24
|
end
|
27
25
|
|
28
26
|
end
|
@@ -9,10 +9,24 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
9
9
|
end
|
10
10
|
}
|
11
11
|
set :syslog_ng_loghost_port, 514
|
12
|
+
|
13
|
+
desc "Setup server"
|
14
|
+
task :server_setup do
|
15
|
+
install_deps
|
16
|
+
deprec2.render_template(
|
17
|
+
:syslog_ng,
|
18
|
+
:template => 'syslog-ng.conf-server',
|
19
|
+
:path => '/etc/syslog-ng/syslog-ng.conf',
|
20
|
+
:mode => 0644,
|
21
|
+
:owner => 'root:root',
|
22
|
+
:remote => true
|
23
|
+
)
|
24
|
+
restart
|
25
|
+
end
|
12
26
|
|
13
27
|
desc "Install syslog-ng"
|
14
28
|
task :install do
|
15
|
-
syslog_ng_loghost_name
|
29
|
+
syslog_ng_loghost_name # get user input at beginning
|
16
30
|
install_deps
|
17
31
|
config
|
18
32
|
end
|
@@ -26,6 +26,11 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
26
26
|
|
27
27
|
SYSTEM_CONFIG_FILES[:apache] = [
|
28
28
|
|
29
|
+
{ :template => 'apache2.conf.erb',
|
30
|
+
:path => '/etc/apache2/apache2.conf',
|
31
|
+
:mode => 0644,
|
32
|
+
:owner => 'root:root'},
|
33
|
+
|
29
34
|
{ :template => 'namevirtualhosts.conf',
|
30
35
|
:path => '/etc/apache2/conf.d/namevirtualhosts.conf',
|
31
36
|
:mode => 0644,
|
@@ -0,0 +1,295 @@
|
|
1
|
+
#
|
2
|
+
# Based upon the NCSA server configuration files originally by Rob McCool.
|
3
|
+
#
|
4
|
+
# This is the main Apache server configuration file. It contains the
|
5
|
+
# configuration directives that give the server its instructions.
|
6
|
+
# See http://httpd.apache.org/docs/2.2/ for detailed information about
|
7
|
+
# the directives.
|
8
|
+
#
|
9
|
+
# Do NOT simply read the instructions in here without understanding
|
10
|
+
# what they do. They're here only as hints or reminders. If you are unsure
|
11
|
+
# consult the online docs. You have been warned.
|
12
|
+
#
|
13
|
+
# The configuration directives are grouped into three basic sections:
|
14
|
+
# 1. Directives that control the operation of the Apache server process as a
|
15
|
+
# whole (the 'global environment').
|
16
|
+
# 2. Directives that define the parameters of the 'main' or 'default' server,
|
17
|
+
# which responds to requests that aren't handled by a virtual host.
|
18
|
+
# These directives also provide default values for the settings
|
19
|
+
# of all virtual hosts.
|
20
|
+
# 3. Settings for virtual hosts, which allow Web requests to be sent to
|
21
|
+
# different IP addresses or hostnames and have them handled by the
|
22
|
+
# same Apache server process.
|
23
|
+
#
|
24
|
+
# Configuration and logfile names: If the filenames you specify for many
|
25
|
+
# of the server's control files begin with "/" (or "drive:/" for Win32), the
|
26
|
+
# server will use that explicit path. If the filenames do *not* begin
|
27
|
+
# with "/", the value of ServerRoot is prepended -- so "/var/log/apache2/foo.log"
|
28
|
+
# with ServerRoot set to "" will be interpreted by the
|
29
|
+
# server as "//var/log/apache2/foo.log".
|
30
|
+
#
|
31
|
+
|
32
|
+
### Section 1: Global Environment
|
33
|
+
#
|
34
|
+
# The directives in this section affect the overall operation of Apache,
|
35
|
+
# such as the number of concurrent requests it can handle or where it
|
36
|
+
# can find its configuration files.
|
37
|
+
#
|
38
|
+
|
39
|
+
#
|
40
|
+
# ServerRoot: The top of the directory tree under which the server's
|
41
|
+
# configuration, error, and log files are kept.
|
42
|
+
#
|
43
|
+
# NOTE! If you intend to place this on an NFS (or otherwise network)
|
44
|
+
# mounted filesystem then please read the LockFile documentation (available
|
45
|
+
# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
|
46
|
+
# you will save yourself a lot of trouble.
|
47
|
+
#
|
48
|
+
# Do NOT add a slash at the end of the directory path.
|
49
|
+
#
|
50
|
+
ServerRoot "/etc/apache2"
|
51
|
+
|
52
|
+
#
|
53
|
+
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
|
54
|
+
#
|
55
|
+
#<IfModule !mpm_winnt.c>
|
56
|
+
#<IfModule !mpm_netware.c>
|
57
|
+
LockFile /var/lock/apache2/accept.lock
|
58
|
+
#</IfModule>
|
59
|
+
#</IfModule>
|
60
|
+
|
61
|
+
#
|
62
|
+
# PidFile: The file in which the server should record its process
|
63
|
+
# identification number when it starts.
|
64
|
+
#
|
65
|
+
PidFile /var/run/apache2.pid
|
66
|
+
|
67
|
+
#
|
68
|
+
# Timeout: The number of seconds before receives and sends time out.
|
69
|
+
#
|
70
|
+
Timeout 300
|
71
|
+
|
72
|
+
#
|
73
|
+
# KeepAlive: Whether or not to allow persistent connections (more than
|
74
|
+
# one request per connection). Set to "Off" to deactivate.
|
75
|
+
#
|
76
|
+
KeepAlive On
|
77
|
+
|
78
|
+
#
|
79
|
+
# MaxKeepAliveRequests: The maximum number of requests to allow
|
80
|
+
# during a persistent connection. Set to 0 to allow an unlimited amount.
|
81
|
+
# We recommend you leave this number high, for maximum performance.
|
82
|
+
#
|
83
|
+
MaxKeepAliveRequests 100
|
84
|
+
|
85
|
+
#
|
86
|
+
# KeepAliveTimeout: Number of seconds to wait for the next request from the
|
87
|
+
# same client on the same connection.
|
88
|
+
#
|
89
|
+
KeepAliveTimeout 15
|
90
|
+
|
91
|
+
##
|
92
|
+
## Server-Pool Size Regulation (MPM specific)
|
93
|
+
##
|
94
|
+
|
95
|
+
# prefork MPM
|
96
|
+
# StartServers: number of server processes to start
|
97
|
+
# MinSpareServers: minimum number of server processes which are kept spare
|
98
|
+
# MaxSpareServers: maximum number of server processes which are kept spare
|
99
|
+
# MaxClients: maximum number of server processes allowed to start
|
100
|
+
# MaxRequestsPerChild: maximum number of requests a server process serves
|
101
|
+
<IfModule mpm_prefork_module>
|
102
|
+
StartServers 5
|
103
|
+
MinSpareServers 5
|
104
|
+
MaxSpareServers 10
|
105
|
+
MaxClients 150
|
106
|
+
MaxRequestsPerChild 0
|
107
|
+
</IfModule>
|
108
|
+
|
109
|
+
# worker MPM
|
110
|
+
# StartServers: initial number of server processes to start
|
111
|
+
# MaxClients: maximum number of simultaneous client connections
|
112
|
+
# MinSpareThreads: minimum number of worker threads which are kept spare
|
113
|
+
# MaxSpareThreads: maximum number of worker threads which are kept spare
|
114
|
+
# ThreadsPerChild: constant number of worker threads in each server process
|
115
|
+
# MaxRequestsPerChild: maximum number of requests a server process serves
|
116
|
+
<IfModule mpm_worker_module>
|
117
|
+
StartServers 2
|
118
|
+
MaxClients 150
|
119
|
+
MinSpareThreads 25
|
120
|
+
MaxSpareThreads 75
|
121
|
+
ThreadsPerChild 25
|
122
|
+
MaxRequestsPerChild 0
|
123
|
+
</IfModule>
|
124
|
+
|
125
|
+
User www-data
|
126
|
+
Group www-data
|
127
|
+
|
128
|
+
#
|
129
|
+
# AccessFileName: The name of the file to look for in each directory
|
130
|
+
# for additional configuration directives. See also the AllowOverride
|
131
|
+
# directive.
|
132
|
+
#
|
133
|
+
|
134
|
+
AccessFileName .htaccess
|
135
|
+
|
136
|
+
#
|
137
|
+
# The following lines prevent .htaccess and .htpasswd files from being
|
138
|
+
# viewed by Web clients.
|
139
|
+
#
|
140
|
+
<Files ~ "^\.ht">
|
141
|
+
Order allow,deny
|
142
|
+
Deny from all
|
143
|
+
</Files>
|
144
|
+
|
145
|
+
#
|
146
|
+
# DefaultType is the default MIME type the server will use for a document
|
147
|
+
# if it cannot otherwise determine one, such as from filename extensions.
|
148
|
+
# If your server contains mostly text or HTML documents, "text/plain" is
|
149
|
+
# a good value. If most of your content is binary, such as applications
|
150
|
+
# or images, you may want to use "application/octet-stream" instead to
|
151
|
+
# keep browsers from trying to display binary files as though they are
|
152
|
+
# text.
|
153
|
+
#
|
154
|
+
DefaultType text/plain
|
155
|
+
|
156
|
+
|
157
|
+
#
|
158
|
+
# HostnameLookups: Log the names of clients or just their IP addresses
|
159
|
+
# e.g., www.apache.org (on) or 204.62.129.132 (off).
|
160
|
+
# The default is off because it'd be overall better for the net if people
|
161
|
+
# had to knowingly turn this feature on, since enabling it means that
|
162
|
+
# each client request will result in AT LEAST one lookup request to the
|
163
|
+
# nameserver.
|
164
|
+
#
|
165
|
+
HostnameLookups Off
|
166
|
+
|
167
|
+
# ErrorLog: The location of the error log file.
|
168
|
+
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
169
|
+
# container, error messages relating to that virtual host will be
|
170
|
+
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
171
|
+
# container, that host's errors will be logged there and not here.
|
172
|
+
#
|
173
|
+
ErrorLog /var/log/apache2/error.log
|
174
|
+
|
175
|
+
#
|
176
|
+
# LogLevel: Control the number of messages logged to the error_log.
|
177
|
+
# Possible values include: debug, info, notice, warn, error, crit,
|
178
|
+
# alert, emerg.
|
179
|
+
#
|
180
|
+
LogLevel warn
|
181
|
+
|
182
|
+
# Include module configuration:
|
183
|
+
Include /etc/apache2/mods-enabled/*.load
|
184
|
+
Include /etc/apache2/mods-enabled/*.conf
|
185
|
+
|
186
|
+
# Include all the user configurations:
|
187
|
+
Include /etc/apache2/httpd.conf
|
188
|
+
|
189
|
+
# Include ports listing
|
190
|
+
Include /etc/apache2/ports.conf
|
191
|
+
|
192
|
+
#
|
193
|
+
# The following directives define some format nicknames for use with
|
194
|
+
# a CustomLog directive (see below).
|
195
|
+
#
|
196
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
197
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
198
|
+
LogFormat "%{Referer}i -> %U" referer
|
199
|
+
LogFormat "%{User-agent}i" agent
|
200
|
+
|
201
|
+
#
|
202
|
+
# ServerTokens
|
203
|
+
# This directive configures what you return as the Server HTTP response
|
204
|
+
# Header. The default is 'Full' which sends information about the OS-Type
|
205
|
+
# and compiled in modules.
|
206
|
+
# Set to one of: Full | OS | Minor | Minimal | Major | Prod
|
207
|
+
# where Full conveys the most information, and Prod the least.
|
208
|
+
#
|
209
|
+
ServerTokens Full
|
210
|
+
|
211
|
+
#
|
212
|
+
# Optionally add a line containing the server version and virtual host
|
213
|
+
# name to server-generated pages (internal error documents, FTP directory
|
214
|
+
# listings, mod_status and mod_info output etc., but not CGI generated
|
215
|
+
# documents or custom error documents).
|
216
|
+
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
|
217
|
+
# Set to one of: On | Off | EMail
|
218
|
+
#
|
219
|
+
ServerSignature On
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
#
|
224
|
+
# Customizable error responses come in three flavors:
|
225
|
+
# 1) plain text 2) local redirects 3) external redirects
|
226
|
+
#
|
227
|
+
# Some examples:
|
228
|
+
#ErrorDocument 500 "The server made a boo boo."
|
229
|
+
#ErrorDocument 404 /missing.html
|
230
|
+
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
|
231
|
+
#ErrorDocument 402 http://www.example.com/subscription_info.html
|
232
|
+
#
|
233
|
+
|
234
|
+
#
|
235
|
+
# Putting this all together, we can internationalize error responses.
|
236
|
+
#
|
237
|
+
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
|
238
|
+
# our collection of by-error message multi-language collections. We use
|
239
|
+
# includes to substitute the appropriate text.
|
240
|
+
#
|
241
|
+
# You can modify the messages' appearance without changing any of the
|
242
|
+
# default HTTP_<error>.html.var files by adding the line:
|
243
|
+
#
|
244
|
+
# Alias /error/include/ "/your/include/path/"
|
245
|
+
#
|
246
|
+
# which allows you to create your own set of files by starting with the
|
247
|
+
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
|
248
|
+
# even on a per-VirtualHost basis. The default include files will display
|
249
|
+
# your Apache version number and your ServerAdmin email address regardless
|
250
|
+
# of the setting of ServerSignature.
|
251
|
+
#
|
252
|
+
# The internationalized error documents require mod_alias, mod_include
|
253
|
+
# and mod_negotiation. To activate them, uncomment the following 30 lines.
|
254
|
+
|
255
|
+
# Alias /error/ "/usr/share/apache2/error/"
|
256
|
+
#
|
257
|
+
# <Directory "/usr/share/apache2/error">
|
258
|
+
# AllowOverride None
|
259
|
+
# Options IncludesNoExec
|
260
|
+
# AddOutputFilter Includes html
|
261
|
+
# AddHandler type-map var
|
262
|
+
# Order allow,deny
|
263
|
+
# Allow from all
|
264
|
+
# LanguagePriority en cs de es fr it nl sv pt-br ro
|
265
|
+
# ForceLanguagePriority Prefer Fallback
|
266
|
+
# </Directory>
|
267
|
+
#
|
268
|
+
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
|
269
|
+
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
|
270
|
+
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
|
271
|
+
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
|
272
|
+
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
|
273
|
+
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
|
274
|
+
# ErrorDocument 410 /error/HTTP_GONE.html.var
|
275
|
+
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
|
276
|
+
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
|
277
|
+
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
|
278
|
+
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
|
279
|
+
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
|
280
|
+
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
|
281
|
+
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
|
282
|
+
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
|
283
|
+
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
|
284
|
+
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
# Include of directories ignores editors' and dpkg's backup files,
|
289
|
+
# see README.Debian for details.
|
290
|
+
|
291
|
+
# Include generic snippets of statements
|
292
|
+
Include /etc/apache2/conf.d/
|
293
|
+
|
294
|
+
# Include the virtual host configurations:
|
295
|
+
Include /etc/apache2/sites-enabled/
|
@@ -97,10 +97,6 @@ source s_all {
|
|
97
97
|
######
|
98
98
|
# destinations
|
99
99
|
|
100
|
-
<% if syslog_ng_loghost_name and syslog_ng_loghost_name.to_s != '' %>
|
101
|
-
destination loghost { tcp("<%= syslog_ng_loghost_name %>" port (<%= syslog_ng_loghost_port %>)); };
|
102
|
-
<% end %>
|
103
|
-
|
104
100
|
# some standard log files
|
105
101
|
destination df_auth { file("/var/log/auth.log"); };
|
106
102
|
destination df_syslog { file("/var/log/syslog"); };
|
@@ -199,17 +195,6 @@ filter f_xconsole {
|
|
199
195
|
|
200
196
|
# these rules provide the same behavior as the commented original syslogd rules
|
201
197
|
|
202
|
-
|
203
|
-
<% if syslog_ng_loghost_name and syslog_ng_loghost_name.to_s != '' %>
|
204
|
-
# Send to loghost
|
205
|
-
log {
|
206
|
-
source(s_all);
|
207
|
-
# filter(notdebug);
|
208
|
-
destination(loghost);
|
209
|
-
};
|
210
|
-
<% end %>
|
211
|
-
|
212
|
-
|
213
198
|
# auth,authpriv.* /var/log/auth.log
|
214
199
|
log {
|
215
200
|
source(s_all);
|
@@ -361,3 +346,10 @@ log {
|
|
361
346
|
destination(dp_xconsole);
|
362
347
|
};
|
363
348
|
|
349
|
+
<% if syslog_ng_loghost_name and syslog_ng_loghost_name.to_s != '' %>
|
350
|
+
# Send all logs to loghost
|
351
|
+
|
352
|
+
destination loghost { tcp("<%= syslog_ng_loghost_name %>" port (<%= syslog_ng_loghost_port %>)); };
|
353
|
+
log { source(s_all); destination(loghost); };
|
354
|
+
|
355
|
+
<% end %>
|
@@ -52,7 +52,7 @@ module Gem
|
|
52
52
|
# +packages+ can be a single string or an array of strings.
|
53
53
|
#
|
54
54
|
def install(packages, version=nil)
|
55
|
-
send(run_method,"#{GEM_INSTALL} #{if version then '-v '+version.to_s end} #{packages.
|
55
|
+
send(run_method,"#{GEM_INSTALL} #{if version then '-v '+version.to_s end} #{Array(packages).join(' ')}")
|
56
56
|
end
|
57
57
|
|
58
58
|
# Auto selects a gem from a list and installs it.
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 2.1.
|
8
|
+
- 12
|
9
|
+
version: 2.1.12
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mike Bailey
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-09-
|
17
|
+
date: 2010-09-17 00:00:00 +10:00
|
18
18
|
default_executable: depify
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -198,6 +198,7 @@ files:
|
|
198
198
|
- lib/deprec/templates/subversion/svn.apache.vhost.erb
|
199
199
|
- lib/deprec/templates/apache/status.conf.erb
|
200
200
|
- lib/deprec/templates/apache/ports.conf.erb
|
201
|
+
- lib/deprec/templates/apache/apache2.conf.erb
|
201
202
|
- lib/deprec/templates/apache/namevirtualhosts.conf
|
202
203
|
- lib/deprec/templates/deprec/caprc.erb
|
203
204
|
- lib/deprec/templates/collectd/collectd.conf.erb
|