Empact-deprec 1.99.21
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +170 -0
- data/COPYING +19 -0
- data/LICENSE +339 -0
- data/README +136 -0
- data/THANKS +5 -0
- data/bin/depify +133 -0
- data/docs/ANNOUNCE.deprec2 +47 -0
- data/docs/README.install +88 -0
- data/docs/README.nagios +28 -0
- data/docs/README.rails +20 -0
- data/docs/README.svn +31 -0
- data/docs/ROADMAP.txt +74 -0
- data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
- data/docs/deprec-1.x/notes.txt +12 -0
- data/docs/deprec_banner.gif +0 -0
- data/lib/deprec.rb +8 -0
- data/lib/deprec/capistrano_extensions.rb +378 -0
- data/lib/deprec/recipes.rb +40 -0
- data/lib/deprec/recipes/aoe.rb +117 -0
- data/lib/deprec/recipes/apache.rb +179 -0
- data/lib/deprec/recipes/ar_sendmail.rb +65 -0
- data/lib/deprec/recipes/canonical.rb +57 -0
- data/lib/deprec/recipes/deprec.rb +155 -0
- data/lib/deprec/recipes/deprecated.rb +71 -0
- data/lib/deprec/recipes/example.rb +115 -0
- data/lib/deprec/recipes/git.rb +168 -0
- data/lib/deprec/recipes/gitosis.rb +47 -0
- data/lib/deprec/recipes/god.rb +107 -0
- data/lib/deprec/recipes/heartbeat.rb +138 -0
- data/lib/deprec/recipes/iptables.rb +53 -0
- data/lib/deprec/recipes/logrotate.rb +51 -0
- data/lib/deprec/recipes/lvm.rb +20 -0
- data/lib/deprec/recipes/memcached.rb +102 -0
- data/lib/deprec/recipes/mongrel.rb +209 -0
- data/lib/deprec/recipes/monit.rb +130 -0
- data/lib/deprec/recipes/mysql.rb +115 -0
- data/lib/deprec/recipes/nagios.rb +302 -0
- data/lib/deprec/recipes/network.rb +84 -0
- data/lib/deprec/recipes/nginx.rb +154 -0
- data/lib/deprec/recipes/ntp.rb +96 -0
- data/lib/deprec/recipes/php.rb +99 -0
- data/lib/deprec/recipes/postfix.rb +105 -0
- data/lib/deprec/recipes/rails.rb +302 -0
- data/lib/deprec/recipes/ruby.rb +66 -0
- data/lib/deprec/recipes/sphinx.rb +83 -0
- data/lib/deprec/recipes/ssh.rb +93 -0
- data/lib/deprec/recipes/svn.rb +169 -0
- data/lib/deprec/recipes/swiftiply.rb +108 -0
- data/lib/deprec/recipes/thin.rb +201 -0
- data/lib/deprec/recipes/trac.rb +277 -0
- data/lib/deprec/recipes/ubuntu.rb +20 -0
- data/lib/deprec/recipes/users.rb +90 -0
- data/lib/deprec/recipes/utils.rb +39 -0
- data/lib/deprec/recipes/xen.rb +259 -0
- data/lib/deprec/templates/aoe/aoe-init +55 -0
- data/lib/deprec/templates/aoe/fence_aoemask +351 -0
- data/lib/deprec/templates/apache/httpd-vhost-app.conf.erb +144 -0
- data/lib/deprec/templates/apache/httpd.conf +465 -0
- data/lib/deprec/templates/apache/index.html.erb +37 -0
- data/lib/deprec/templates/apache/master.css +72 -0
- data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
- data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
- data/lib/deprec/templates/coraid/aoe-init +55 -0
- data/lib/deprec/templates/deprec/caprc.erb +14 -0
- data/lib/deprec/templates/god/god-init-script +71 -0
- data/lib/deprec/templates/god/god-notifications +0 -0
- data/lib/deprec/templates/god/god_mongrel.erb +81 -0
- data/lib/deprec/templates/god/god_mysql.erb +50 -0
- data/lib/deprec/templates/god/god_nginx.erb +61 -0
- data/lib/deprec/templates/god/god_thin.erb +80 -0
- data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
- data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
- data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
- data/lib/deprec/templates/iptables/iptables.up.erb +41 -0
- data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
- data/lib/deprec/templates/memcached/memcached-init-script +65 -0
- data/lib/deprec/templates/memcached/memcached.conf.erb +46 -0
- data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster.logrotate.d +14 -0
- data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
- data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
- data/lib/deprec/templates/monit/monit-init-script +104 -0
- data/lib/deprec/templates/monit/monitrc.erb +227 -0
- data/lib/deprec/templates/monit/nothing +0 -0
- data/lib/deprec/templates/mysql/create_databases.sql +20 -0
- data/lib/deprec/templates/mysql/database.yml.prod +6 -0
- data/lib/deprec/templates/mysql/database.yml.stage +6 -0
- data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
- data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
- data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
- data/lib/deprec/templates/nagios/cgi.cfg.erb +321 -0
- data/lib/deprec/templates/nagios/commands.cfg.erb +240 -0
- data/lib/deprec/templates/nagios/contacts.cfg.erb +75 -0
- data/lib/deprec/templates/nagios/hosts.cfg.erb +70 -0
- data/lib/deprec/templates/nagios/htpasswd.users +1 -0
- data/lib/deprec/templates/nagios/localhost.cfg.erb +157 -0
- data/lib/deprec/templates/nagios/nagios.cfg.erb +1274 -0
- data/lib/deprec/templates/nagios/nagios_apache_vhost.conf.erb +45 -0
- data/lib/deprec/templates/nagios/nrpe.cfg.erb +208 -0
- data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
- data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
- data/lib/deprec/templates/nagios/services.cfg.erb +7 -0
- data/lib/deprec/templates/nagios/templates.cfg.erb +190 -0
- data/lib/deprec/templates/nagios/timeperiods.cfg.erb +94 -0
- data/lib/deprec/templates/network/hostname.erb +1 -0
- data/lib/deprec/templates/network/hosts.erb +2 -0
- data/lib/deprec/templates/network/interfaces.erb +18 -0
- data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
- data/lib/deprec/templates/nginx/mime.types.erb +70 -0
- data/lib/deprec/templates/nginx/nginx-init-script +62 -0
- data/lib/deprec/templates/nginx/nginx.conf.erb +53 -0
- data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
- data/lib/deprec/templates/nginx/nothing.conf +1 -0
- data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +45 -0
- data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
- data/lib/deprec/templates/postfix/aliases.erb +3 -0
- data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
- data/lib/deprec/templates/postfix/main.cf.erb +41 -0
- data/lib/deprec/templates/postfix/master.cf.erb +77 -0
- data/lib/deprec/templates/rails/database.yml.erb +6 -0
- data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
- data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
- data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
- data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
- data/lib/deprec/templates/swiftiply/swiftiply-init-script +61 -0
- data/lib/deprec/templates/swiftiply/swiftiply.yml.erb +11 -0
- data/lib/deprec/templates/thin/thin-init-script +51 -0
- data/lib/deprec/templates/thin/thin.yml.erb +11 -0
- data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
- data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
- data/lib/deprec/templates/trac/trac.ini.erb +169 -0
- data/lib/deprec/templates/trac/trac_deprec.png +0 -0
- data/lib/deprec/templates/trac/tracd-init.erb +43 -0
- data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
- data/lib/deprec/templates/xen/15-disable-hwclock +40 -0
- data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
- data/lib/deprec/templates/xen/xen-tools.conf.erb +220 -0
- data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
- data/lib/deprec/templates/xen/xend-init.erb +69 -0
- data/lib/deprec/templates/xen/xendomains.erb +137 -0
- data/lib/deprec/templates/xen/xm.tmpl.erb +85 -0
- data/lib/vmbuilder_plugins/all.rb +20 -0
- data/lib/vmbuilder_plugins/apt.rb +93 -0
- data/lib/vmbuilder_plugins/emerge.rb +76 -0
- data/lib/vmbuilder_plugins/gem.rb +90 -0
- data/lib/vmbuilder_plugins/std.rb +203 -0
- metadata +207 -0
@@ -0,0 +1,94 @@
|
|
1
|
+
###############################################################################
|
2
|
+
# TIMEPERIODS.CFG - SAMPLE TIMEPERIOD DEFINITIONS
|
3
|
+
#
|
4
|
+
# Last Modified: 05-31-2007
|
5
|
+
#
|
6
|
+
# NOTES: This config file provides you with some example timeperiod definitions
|
7
|
+
# that you can reference in host, service, contact, and dependency
|
8
|
+
# definitions.
|
9
|
+
#
|
10
|
+
# You don't need to keep timeperiods in a separate file from your other
|
11
|
+
# object definitions. This has been done just to make things easier to
|
12
|
+
# understand.
|
13
|
+
#
|
14
|
+
###############################################################################
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
###############################################################################
|
19
|
+
###############################################################################
|
20
|
+
#
|
21
|
+
# TIME PERIODS
|
22
|
+
#
|
23
|
+
###############################################################################
|
24
|
+
###############################################################################
|
25
|
+
|
26
|
+
# This defines a timeperiod where all times are valid for checks,
|
27
|
+
# notifications, etc. The classic "24x7" support nightmare. :-)
|
28
|
+
define timeperiod{
|
29
|
+
timeperiod_name 24x7
|
30
|
+
alias 24 Hours A Day, 7 Days A Week
|
31
|
+
sunday 00:00-24:00
|
32
|
+
monday 00:00-24:00
|
33
|
+
tuesday 00:00-24:00
|
34
|
+
wednesday 00:00-24:00
|
35
|
+
thursday 00:00-24:00
|
36
|
+
friday 00:00-24:00
|
37
|
+
saturday 00:00-24:00
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
# 'workhours' timeperiod definition
|
42
|
+
define timeperiod{
|
43
|
+
timeperiod_name workhours
|
44
|
+
alias Normal Work Hours
|
45
|
+
monday 09:00-17:00
|
46
|
+
tuesday 09:00-17:00
|
47
|
+
wednesday 09:00-17:00
|
48
|
+
thursday 09:00-17:00
|
49
|
+
friday 09:00-17:00
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
# 'none' timeperiod definition
|
54
|
+
define timeperiod{
|
55
|
+
timeperiod_name none
|
56
|
+
alias No Time Is A Good Time
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
# Some U.S. holidays
|
61
|
+
# Note: The timeranges for each holiday are meant to *exclude* the holidays from being
|
62
|
+
# treated as a valid time for notifications, etc. You probably don't want your pager
|
63
|
+
# going off on New Year's. Although you're employer might... :-)
|
64
|
+
define timeperiod{
|
65
|
+
name us-holidays
|
66
|
+
timeperiod_name us-holidays
|
67
|
+
alias U.S. Holidays
|
68
|
+
|
69
|
+
january 1 00:00-00:00 ; New Years
|
70
|
+
monday -1 may 00:00-00:00 ; Memorial Day (last Monday in May)
|
71
|
+
july 4 00:00-00:00 ; Independence Day
|
72
|
+
monday 1 september 00:00-00:00 ; Labor Day (first Monday in September)
|
73
|
+
thursday -1 november 00:00-00:00 ; Thanksgiving (last Thursday in November)
|
74
|
+
december 25 00:00-00:00 ; Christmas
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
# This defines a modified "24x7" timeperiod that covers every day of the
|
79
|
+
# year, except for U.S. holidays (defined in the timeperiod above).
|
80
|
+
define timeperiod{
|
81
|
+
timeperiod_name 24x7_sans_holidays
|
82
|
+
alias 24x7 Sans Holidays
|
83
|
+
|
84
|
+
use us-holidays ; Get holiday exceptions from other timeperiod
|
85
|
+
|
86
|
+
sunday 00:00-24:00
|
87
|
+
monday 00:00-24:00
|
88
|
+
tuesday 00:00-24:00
|
89
|
+
wednesday 00:00-24:00
|
90
|
+
thursday 00:00-24:00
|
91
|
+
friday 00:00-24:00
|
92
|
+
saturday 00:00-24:00
|
93
|
+
}
|
94
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= network_hostname %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# This file describes the network interfaces available on your system
|
2
|
+
# and how to activate them. For more information, see interfaces(5).
|
3
|
+
|
4
|
+
# The loopback network interface
|
5
|
+
auto lo
|
6
|
+
iface lo inet loopback
|
7
|
+
pre-up iptables-restore < /etc/iptables.up.rules
|
8
|
+
|
9
|
+
<% network_number_of_ports.to_i.times do |port| %>
|
10
|
+
# The primary network interface
|
11
|
+
auto <%= "eth#{port}" %>
|
12
|
+
iface <%= "eth#{port}" %> inet static
|
13
|
+
address <%= network_interfaces[port][:address] %>
|
14
|
+
netmask <%= network_interfaces[port][:netmask] %>
|
15
|
+
broadcast <%= network_interfaces[port][:broadcast] %>
|
16
|
+
<%= "gateway #{network_gateway}" if port == 0 %>
|
17
|
+
<%= "dns-nameservers #{network_dns_nameservers}" if port == 0 %>
|
18
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/var/www/apps/<%= application %>/shared/log/*access.log /var/www/apps/<%= application %>/shared/log/*error.log{
|
2
|
+
daily
|
3
|
+
missingok
|
4
|
+
compress
|
5
|
+
rotate 21
|
6
|
+
dateext
|
7
|
+
notifempty
|
8
|
+
sharedscripts
|
9
|
+
extension gz
|
10
|
+
postrotate
|
11
|
+
[ ! -f /usr/local/nginx/logs/nginx.pid ] || kill -USR1 `cat /usr/local/nginx/logs/nginx.pid`
|
12
|
+
endscript
|
13
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
|
2
|
+
types {
|
3
|
+
text/html html htm shtml;
|
4
|
+
text/css css;
|
5
|
+
text/xml xml rss;
|
6
|
+
image/gif gif;
|
7
|
+
image/jpeg jpeg jpg;
|
8
|
+
application/x-javascript js;
|
9
|
+
application/atom+xml atom;
|
10
|
+
|
11
|
+
text/mathml mml;
|
12
|
+
text/plain txt;
|
13
|
+
text/vnd.sun.j2me.app-descriptor jad;
|
14
|
+
text/vnd.wap.wml wml;
|
15
|
+
text/x-component htc;
|
16
|
+
|
17
|
+
image/png png;
|
18
|
+
image/tiff tif tiff;
|
19
|
+
image/vnd.wap.wbmp wbmp;
|
20
|
+
image/x-icon ico;
|
21
|
+
image/x-jng jng;
|
22
|
+
image/x-ms-bmp bmp;
|
23
|
+
image/svg+xml svg;
|
24
|
+
|
25
|
+
application/java-archive jar war ear;
|
26
|
+
application/mac-binhex40 hqx;
|
27
|
+
application/msword doc;
|
28
|
+
application/pdf pdf;
|
29
|
+
application/postscript ps eps ai;
|
30
|
+
application/rtf rtf;
|
31
|
+
application/vnd.ms-excel xls;
|
32
|
+
application/vnd.ms-powerpoint ppt;
|
33
|
+
application/vnd.wap.wmlc wmlc;
|
34
|
+
application/vnd.wap.xhtml+xml xhtml;
|
35
|
+
application/x-cocoa cco;
|
36
|
+
application/x-java-archive-diff jardiff;
|
37
|
+
application/x-java-jnlp-file jnlp;
|
38
|
+
application/x-makeself run;
|
39
|
+
application/x-perl pl pm;
|
40
|
+
application/x-pilot prc pdb;
|
41
|
+
application/x-rar-compressed rar;
|
42
|
+
application/x-redhat-package-manager rpm;
|
43
|
+
application/x-sea sea;
|
44
|
+
application/x-shockwave-flash swf;
|
45
|
+
application/x-stuffit sit;
|
46
|
+
application/x-tcl tcl tk;
|
47
|
+
application/x-x509-ca-cert der pem crt;
|
48
|
+
application/x-xpinstall xpi;
|
49
|
+
application/zip zip;
|
50
|
+
|
51
|
+
application/octet-stream bin exe dll;
|
52
|
+
application/octet-stream deb;
|
53
|
+
application/octet-stream dmg;
|
54
|
+
application/octet-stream eot;
|
55
|
+
application/octet-stream iso img;
|
56
|
+
application/octet-stream msi msp msm;
|
57
|
+
|
58
|
+
audio/midi mid midi kar;
|
59
|
+
audio/mpeg mp3;
|
60
|
+
audio/x-realaudio ra;
|
61
|
+
|
62
|
+
video/3gpp 3gpp 3gp;
|
63
|
+
video/mpeg mpeg mpg;
|
64
|
+
video/quicktime mov;
|
65
|
+
video/x-flv flv;
|
66
|
+
video/x-mng mng;
|
67
|
+
video/x-ms-asf asx asf;
|
68
|
+
video/x-ms-wmv wmv;
|
69
|
+
video/x-msvideo avi;
|
70
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
|
3
|
+
### BEGIN INIT INFO
|
4
|
+
# Provides: nginx
|
5
|
+
# Required-Start: $all
|
6
|
+
# Required-Stop: $all
|
7
|
+
# Default-Start: 2 3 4 5
|
8
|
+
# Default-Stop: 0 1 6
|
9
|
+
# Short-Description: starts the nginx web server
|
10
|
+
# Description: starts nginx using start-stop-daemon
|
11
|
+
### END INIT INFO
|
12
|
+
|
13
|
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
14
|
+
DAEMON=/usr/local/sbin/nginx
|
15
|
+
NAME=nginx
|
16
|
+
DESC=nginx
|
17
|
+
|
18
|
+
test -x $DAEMON || exit 0
|
19
|
+
|
20
|
+
# Include nginx defaults if available
|
21
|
+
if [ -f /etc/default/nginx ] ; then
|
22
|
+
. /etc/default/nginx
|
23
|
+
fi
|
24
|
+
|
25
|
+
set -e
|
26
|
+
|
27
|
+
case "$1" in
|
28
|
+
start)
|
29
|
+
echo -n "Starting $DESC: "
|
30
|
+
start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
|
31
|
+
--exec $DAEMON -- $DAEMON_OPTS
|
32
|
+
echo "$NAME."
|
33
|
+
;;
|
34
|
+
stop)
|
35
|
+
echo -n "Stopping $DESC: "
|
36
|
+
start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
|
37
|
+
--exec $DAEMON
|
38
|
+
echo "$NAME."
|
39
|
+
;;
|
40
|
+
restart|force-reload)
|
41
|
+
echo -n "Restarting $DESC: "
|
42
|
+
start-stop-daemon --stop --quiet --pidfile \
|
43
|
+
/usr/local/nginx/logs/$NAME.pid --exec $DAEMON
|
44
|
+
sleep 1
|
45
|
+
start-stop-daemon --start --quiet --pidfile \
|
46
|
+
/usr/local/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
|
47
|
+
echo "$NAME."
|
48
|
+
;;
|
49
|
+
reload)
|
50
|
+
echo -n "Reloading $DESC configuration: "
|
51
|
+
start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
|
52
|
+
--exec $DAEMON
|
53
|
+
echo "$NAME."
|
54
|
+
;;
|
55
|
+
*)
|
56
|
+
N=/etc/init.d/$NAME
|
57
|
+
echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
58
|
+
exit 1
|
59
|
+
;;
|
60
|
+
esac
|
61
|
+
|
62
|
+
exit 0
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
user <%= nginx_user %>;
|
3
|
+
worker_processes 1;
|
4
|
+
|
5
|
+
#error_log logs/error.log;
|
6
|
+
#error_log logs/error.log notice;
|
7
|
+
#error_log logs/error.log info;
|
8
|
+
|
9
|
+
#pid logs/nginx.pid;
|
10
|
+
|
11
|
+
|
12
|
+
events {
|
13
|
+
worker_connections 1024;
|
14
|
+
use epoll;
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
http {
|
19
|
+
include /usr/local/nginx/conf/vhosts/*.conf;
|
20
|
+
include conf/mime.types;
|
21
|
+
default_type application/octet-stream;
|
22
|
+
|
23
|
+
# Tuning Parameters
|
24
|
+
log_format main
|
25
|
+
'$remote_addr - $remote_user [$time_local] '
|
26
|
+
'"$request" $status $bytes_sent '
|
27
|
+
'"$http_referer" "$http_user_agent" '
|
28
|
+
'"$gzip_ratio"';
|
29
|
+
|
30
|
+
client_header_timeout 3m;
|
31
|
+
client_body_timeout 3m;
|
32
|
+
send_timeout 3m;
|
33
|
+
|
34
|
+
client_header_buffer_size 1k;
|
35
|
+
large_client_header_buffers 4 4k;
|
36
|
+
|
37
|
+
gzip_min_length 1100;
|
38
|
+
gzip_buffers 4 8k;
|
39
|
+
gzip_comp_level 2;
|
40
|
+
gzip_proxied any;
|
41
|
+
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
42
|
+
|
43
|
+
output_buffers 1 32k;
|
44
|
+
postpone_output 1460;
|
45
|
+
|
46
|
+
sendfile on;
|
47
|
+
tcp_nopush on;
|
48
|
+
tcp_nodelay on;
|
49
|
+
|
50
|
+
keepalive_timeout 75 20;
|
51
|
+
gzip on;
|
52
|
+
|
53
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
# This dir is for vhost config files
|
@@ -0,0 +1,45 @@
|
|
1
|
+
upstream <%= application %> {
|
2
|
+
server 127.0.0.1:9000;
|
3
|
+
}
|
4
|
+
|
5
|
+
server {
|
6
|
+
listen 80;
|
7
|
+
server_name <%= domain %>;
|
8
|
+
root <%= deploy_to %>/current/public;
|
9
|
+
access_log <%= deploy_to %>/shared/log/<%= domain %>-access.log;
|
10
|
+
error_log <%= deploy_to %>/shared/log/<%= domain %>-error.log;
|
11
|
+
client_max_body_size <%= nginx_client_max_body_size %>;
|
12
|
+
|
13
|
+
if (-f $document_root/system/maintenance.html){
|
14
|
+
rewrite ^(.*)$ /system/maintenance.html last;
|
15
|
+
break;
|
16
|
+
}
|
17
|
+
location / {
|
18
|
+
proxy_set_header X-Real-IP $remote_addr;
|
19
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
20
|
+
proxy_set_header Host $http_host;
|
21
|
+
proxy_redirect false;
|
22
|
+
|
23
|
+
if (-f $request_filename/index.html) {
|
24
|
+
rewrite (.*) $1/index.html break;
|
25
|
+
}
|
26
|
+
if (-f $request_filename.html) {
|
27
|
+
rewrite (.*) $1.html break;
|
28
|
+
}
|
29
|
+
if (!-f $request_filename) {
|
30
|
+
proxy_pass http://<%= application %>;
|
31
|
+
break;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
error_page 500 502 503 504 /50x.html;
|
36
|
+
location = /50x.html {
|
37
|
+
root html;
|
38
|
+
}
|
39
|
+
|
40
|
+
# Tuning Parameters
|
41
|
+
location ~* ^.+\.(jpe?g|gif|css|png|js|ico|html|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mov)$ {
|
42
|
+
expires 60d;
|
43
|
+
access_log off;
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# /etc/ntp.conf, configuration for ntpd
|
2
|
+
|
3
|
+
driftfile /var/lib/ntp/ntp.drift
|
4
|
+
|
5
|
+
# Enable this if you want statistics to be logged.
|
6
|
+
#statsdir /var/log/ntpstats/
|
7
|
+
|
8
|
+
statistics loopstats peerstats clockstats
|
9
|
+
filegen loopstats file loopstats type day enable
|
10
|
+
filegen peerstats file peerstats type day enable
|
11
|
+
filegen clockstats file clockstats type day enable
|
12
|
+
|
13
|
+
|
14
|
+
# You do need to talk to an NTP server or two (or three).
|
15
|
+
server ntp.ubuntu.com
|
16
|
+
server 0.pool.ntp.org
|
17
|
+
server 1.pool.ntp.org
|
18
|
+
server 2.pool.ntp.org
|
19
|
+
server pool.ntp.org
|
20
|
+
|
21
|
+
# By default, exchange time with everybody, but don't allow configuration.
|
22
|
+
# See /usr/share/doc/ntp-doc/html/accopt.html for details.
|
23
|
+
restrict -4 default kod notrap nomodify nopeer noquery
|
24
|
+
restrict -6 default kod notrap nomodify nopeer noquery
|
25
|
+
|
26
|
+
# Local users may interrogate the ntp server more closely.
|
27
|
+
restrict 127.0.0.1
|
28
|
+
restrict ::1
|
29
|
+
|
30
|
+
# Clients from this (example!) subnet have unlimited access,
|
31
|
+
# but only if cryptographically authenticated
|
32
|
+
#restrict 192.168.123.0 mask 255.255.255.0 notrust
|
33
|
+
|
34
|
+
# If you want to provide time to your local subnet, change the next line.
|
35
|
+
# (Again, the address is an example only.)
|
36
|
+
#broadcast 192.168.123.255
|
37
|
+
|
38
|
+
# If you want to listen to time broadcasts on your local subnet,
|
39
|
+
# de-comment the next lines. Please do this only if you trust everybody
|
40
|
+
# on the network!
|
41
|
+
#disable auth
|
42
|
+
#broadcastclient
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Postfix dynamic maps configuration file.
|
2
|
+
#
|
3
|
+
# The first match found is the one that is used. Wildcards are not supported
|
4
|
+
# as of postfix 2.0.2
|
5
|
+
#
|
6
|
+
#type location of .so file open function (mkmap func)
|
7
|
+
#==== ================================ ============= ============
|
8
|
+
tcp /usr/lib/postfix/dict_tcp.so dict_tcp_open
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
|
2
|
+
|
3
|
+
# Debian specific: Specifying a file name will cause the first
|
4
|
+
# line of that file to be used as the name. The Debian default
|
5
|
+
# is /etc/mailname.
|
6
|
+
#myorigin = /etc/mailname
|
7
|
+
|
8
|
+
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
|
9
|
+
biff = no
|
10
|
+
|
11
|
+
# appending .domain is the MUA's job.
|
12
|
+
append_dot_mydomain = no
|
13
|
+
|
14
|
+
# Uncomment the next line to generate "delayed mail" warnings
|
15
|
+
#delay_warning_time = 4h
|
16
|
+
|
17
|
+
# TLS parameters
|
18
|
+
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
|
19
|
+
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
|
20
|
+
smtpd_use_tls=yes
|
21
|
+
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
|
22
|
+
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
|
23
|
+
|
24
|
+
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
|
25
|
+
# information on enabling SSL in the smtp client.
|
26
|
+
|
27
|
+
myhostname = dn.blocksglobal.com
|
28
|
+
alias_maps = hash:/etc/aliases
|
29
|
+
alias_database = hash:/etc/aliases
|
30
|
+
myorigin = /etc/mailname
|
31
|
+
|
32
|
+
# deprec - XXX add something like this to template file
|
33
|
+
#
|
34
|
+
# mydestination = <%# postfix_destination_domains * ', ' %>, localhost.localdomain, localhost
|
35
|
+
mydestination = dn.blocksglobal.com, localhost.blocksglobal.com, , localhost
|
36
|
+
|
37
|
+
relayhost =
|
38
|
+
mynetworks = 127.0.0.0/8
|
39
|
+
mailbox_size_limit = 0
|
40
|
+
recipient_delimiter = +
|
41
|
+
inet_interfaces = all
|