le1t0-deprec 2.1.6.001
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +444 -0
- data/COPYING +19 -0
- data/LICENSE +339 -0
- data/README +154 -0
- data/THANKS +17 -0
- data/bin/depify +139 -0
- data/docs/EXAMPLE-installing_tracks.txt +41 -0
- data/docs/README.nagios +22 -0
- data/docs/README.rails +17 -0
- data/docs/config_gen_explained.txt +39 -0
- data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
- data/docs/deprec-1.x/notes.txt +12 -0
- data/docs/old/deprec_banner.gif +0 -0
- data/docs/windows_linux.txt +350 -0
- data/docs/xen/traffic_monitoring_with_vnstat.txt +95 -0
- data/docs/xen/xen-tools-notes.txt +31 -0
- data/docs/xen/xen_on_hardy.txt +39 -0
- data/lib/deprec.rb +42 -0
- data/lib/deprec/capistrano_extensions.rb +446 -0
- data/lib/deprec/recipes.rb +7 -0
- data/lib/deprec/recipes/aoe.rb +79 -0
- data/lib/deprec/recipes/app/mongrel.rb +213 -0
- data/lib/deprec/recipes/app/passenger.rb +190 -0
- data/lib/deprec/recipes/ar_sendmail.rb +67 -0
- data/lib/deprec/recipes/aspell.rb +22 -0
- data/lib/deprec/recipes/canonical.rb +68 -0
- data/lib/deprec/recipes/cap.rb +39 -0
- data/lib/deprec/recipes/chef.rb +68 -0
- data/lib/deprec/recipes/collectd.rb +112 -0
- data/lib/deprec/recipes/db/couchdb.rb +107 -0
- data/lib/deprec/recipes/db/mysql.rb +194 -0
- data/lib/deprec/recipes/db/postgresql.rb +104 -0
- data/lib/deprec/recipes/db/sqlite.rb +37 -0
- data/lib/deprec/recipes/ddclient.rb +51 -0
- data/lib/deprec/recipes/deprec.rb +167 -0
- data/lib/deprec/recipes/deprecated.rb +71 -0
- data/lib/deprec/recipes/drbd.rb +137 -0
- data/lib/deprec/recipes/dummy.rb +22 -0
- data/lib/deprec/recipes/example.rb +115 -0
- data/lib/deprec/recipes/git.rb +97 -0
- data/lib/deprec/recipes/gitosis.rb.disabled +55 -0
- data/lib/deprec/recipes/glusterfs.rb +176 -0
- data/lib/deprec/recipes/god.rb +70 -0
- data/lib/deprec/recipes/haproxy.rb +115 -0
- data/lib/deprec/recipes/heartbeat.rb +138 -0
- data/lib/deprec/recipes/imagemagick/imagemagick_bin.rb +24 -0
- data/lib/deprec/recipes/imagemagick/imagemagick_src.rb +39 -0
- data/lib/deprec/recipes/integrity.rb +108 -0
- data/lib/deprec/recipes/iptables.rb +94 -0
- data/lib/deprec/recipes/java.rb +23 -0
- data/lib/deprec/recipes/keepalived.rb +78 -0
- data/lib/deprec/recipes/ldap.rb +52 -0
- data/lib/deprec/recipes/logrotate.rb +56 -0
- data/lib/deprec/recipes/lvm.rb +20 -0
- data/lib/deprec/recipes/memcache.rb +49 -0
- data/lib/deprec/recipes/mongodb.rb +94 -0
- data/lib/deprec/recipes/monit.rb +135 -0
- data/lib/deprec/recipes/mysql_proxy.rb +67 -0
- data/lib/deprec/recipes/nagios.rb +361 -0
- data/lib/deprec/recipes/network.rb +116 -0
- data/lib/deprec/recipes/ntp.rb +103 -0
- data/lib/deprec/recipes/php.rb +58 -0
- data/lib/deprec/recipes/postfix.rb +115 -0
- data/lib/deprec/recipes/profiles.rb +125 -0
- data/lib/deprec/recipes/raid/amcc_3ware.rb +21 -0
- data/lib/deprec/recipes/rails.rb +330 -0
- data/lib/deprec/recipes/redhat_cluster.rb +228 -0
- data/lib/deprec/recipes/redis.rb +90 -0
- data/lib/deprec/recipes/ruby/mri.rb +55 -0
- data/lib/deprec/recipes/ruby/ree.rb +40 -0
- data/lib/deprec/recipes/rvm.rb +32 -0
- data/lib/deprec/recipes/s3utils.rb +63 -0
- data/lib/deprec/recipes/sphinx/thinking_sphinx.rb +105 -0
- data/lib/deprec/recipes/sphinx/ultrasphinx.rb +86 -0
- data/lib/deprec/recipes/ssh.rb +147 -0
- data/lib/deprec/recipes/ssl.rb +56 -0
- data/lib/deprec/recipes/starling.rb +119 -0
- data/lib/deprec/recipes/svn.rb +171 -0
- data/lib/deprec/recipes/syslog.rb +63 -0
- data/lib/deprec/recipes/trac.rb.disabled +277 -0
- data/lib/deprec/recipes/tsung.rb +74 -0
- data/lib/deprec/recipes/ubuntu.rb +90 -0
- data/lib/deprec/recipes/users.rb +90 -0
- data/lib/deprec/recipes/utils.rb +58 -0
- data/lib/deprec/recipes/vnstat.rb +85 -0
- data/lib/deprec/recipes/web/apache.rb +143 -0
- data/lib/deprec/recipes/web/nginx.rb +172 -0
- data/lib/deprec/recipes/wordpress.rb.notworking +96 -0
- data/lib/deprec/recipes/wpmu.rb +103 -0
- data/lib/deprec/recipes/xen.rb +364 -0
- data/lib/deprec/recipes/xentools.rb +101 -0
- data/lib/deprec/recipes_minus_rails.rb +125 -0
- data/lib/deprec/templates/aoe/aoe-init +55 -0
- data/lib/deprec/templates/aoe/fence_aoemask +351 -0
- data/lib/deprec/templates/apache/namevirtualhosts.conf +5 -0
- data/lib/deprec/templates/apache/ports.conf.erb +5 -0
- data/lib/deprec/templates/apache/status.conf.erb +17 -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/chef/chef.json.erb +1 -0
- data/lib/deprec/templates/chef/solo.rb +2 -0
- data/lib/deprec/templates/collectd/collectd-init.d +153 -0
- data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
- data/lib/deprec/templates/ddclient/ddclient.conf.erb +11 -0
- data/lib/deprec/templates/ddclient/ddclient.erb +15 -0
- data/lib/deprec/templates/deprec/caprc.erb +14 -0
- data/lib/deprec/templates/drbd/drbd.conf.erb +531 -0
- data/lib/deprec/templates/glusterfs/glusterfsd-init.erb +95 -0
- data/lib/deprec/templates/gnbd_client/cluster.conf.erb +21 -0
- data/lib/deprec/templates/gnbd_client/clvm-default.erb +3 -0
- data/lib/deprec/templates/gnbd_client/cman-default.erb +6 -0
- data/lib/deprec/templates/gnbd_client/gnbdimports.conf.erb +1 -0
- data/lib/deprec/templates/gnbd_server/cluster.conf.erb +20 -0
- data/lib/deprec/templates/gnbd_server/clvm-default.erb +3 -0
- data/lib/deprec/templates/gnbd_server/cman-default.erb +6 -0
- data/lib/deprec/templates/gnbd_server/gnbd-server-default.erb +1 -0
- data/lib/deprec/templates/gnbd_server/gnbdexports.conf.erb +1 -0
- data/lib/deprec/templates/god/god-conf.erb +2 -0
- data/lib/deprec/templates/god/god-init.erb +47 -0
- data/lib/deprec/templates/haproxy/haproxy-init.d +120 -0
- data/lib/deprec/templates/haproxy/haproxy.cfg.erb +31 -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/integrity/apache_vhost.erb +4 -0
- data/lib/deprec/templates/integrity/config.ru.erb +21 -0
- data/lib/deprec/templates/integrity/config.yml.erb +43 -0
- data/lib/deprec/templates/iptables/firewall-default.erb +13 -0
- data/lib/deprec/templates/iptables/firewall-init.erb +171 -0
- data/lib/deprec/templates/keepalived/keepalived.conf.erb +18 -0
- data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
- data/lib/deprec/templates/mongodb/mongodb-init.d +88 -0
- data/lib/deprec/templates/mongrel/apache_vhost.conf.erb +148 -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.yml.erb +10 -0
- data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
- data/lib/deprec/templates/mongrel/nginx_vhost.conf.erb +41 -0
- data/lib/deprec/templates/monit/monit-init-script +104 -0
- data/lib/deprec/templates/monit/monitrc.erb +250 -0
- data/lib/deprec/templates/monit/nothing.monitrc +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/mysql_proxy/mysql-proxy-default.erb +4 -0
- data/lib/deprec/templates/nagios/README +32 -0
- data/lib/deprec/templates/nagios/cgi.cfg.erb +357 -0
- data/lib/deprec/templates/nagios/check_linux_free_memory.pl +118 -0
- data/lib/deprec/templates/nagios/check_mongrel_cluster.rb +82 -0
- data/lib/deprec/templates/nagios/htpasswd.users +1 -0
- data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
- data/lib/deprec/templates/nagios/nagios.cfg.erb +1325 -0
- data/lib/deprec/templates/nagios/nrpe.cfg.erb +222 -0
- data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
- data/lib/deprec/templates/nagios/objects/commands.cfg.erb +265 -0
- data/lib/deprec/templates/nagios/objects/contacts.cfg.erb +89 -0
- data/lib/deprec/templates/nagios/objects/hosts.cfg.erb +114 -0
- data/lib/deprec/templates/nagios/objects/localhost.cfg.erb +116 -0
- data/lib/deprec/templates/nagios/objects/services.cfg.erb +165 -0
- data/lib/deprec/templates/nagios/objects/timeperiods.cfg.erb +94 -0
- data/lib/deprec/templates/nagios/resource.cfg.erb +34 -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/network/resolv.conf.erb +6 -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 +125 -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 +41 -0
- data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
- data/lib/deprec/templates/passenger/apache_vhost.erb +29 -0
- data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
- data/lib/deprec/templates/passenger/passenger.conf.erb +21 -0
- data/lib/deprec/templates/passenger/passenger.load.erb +3 -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 +36 -0
- data/lib/deprec/templates/postfix/master.cf.erb +77 -0
- data/lib/deprec/templates/redis/redis-conf.erb +132 -0
- data/lib/deprec/templates/redis/redis-init.erb +50 -0
- data/lib/deprec/templates/s3utils/s3cfg +35 -0
- data/lib/deprec/templates/s3utils/s3config.yml +3 -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/ssl/make-ssl-cert +138 -0
- data/lib/deprec/templates/ssl/ssl-cert-snakeoil.key +15 -0
- data/lib/deprec/templates/ssl/ssl-cert-snakeoil.pem +19 -0
- data/lib/deprec/templates/starling/monit.conf.erb +14 -0
- data/lib/deprec/templates/starling/starling-init-script.erb +71 -0
- data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
- data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
- data/lib/deprec/templates/syslog/syslogd.erb +13 -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/tsung/tsung.xml.erb +47 -0
- data/lib/deprec/templates/vnstat/config.php +57 -0
- data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +31 -0
- data/lib/deprec/templates/wordpress/wp-config.php.erb +31 -0
- data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +13 -0
- data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
- data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
- data/lib/deprec/templates/xen/xend-init.erb +57 -0
- data/lib/deprec/templates/xen/xendomains.erb +137 -0
- data/lib/deprec/templates/xentools/100-ubuntu-setup +26 -0
- data/lib/deprec/templates/xentools/15-disable-hwclock +40 -0
- data/lib/deprec/templates/xentools/30-disable-gettys +57 -0
- data/lib/deprec/templates/xentools/31-ubuntu-setup +32 -0
- data/lib/deprec/templates/xentools/40-setup-networking +145 -0
- data/lib/deprec/templates/xentools/98-custom +17 -0
- data/lib/deprec/templates/xentools/xen-tools.conf.erb +278 -0
- data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
- data/lib/deprec_cmd_completion.sh +26 -0
- data/lib/deprec_minus_rails.rb +12 -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 +100 -0
- data/lib/vmbuilder_plugins/std.rb +203 -0
- metadata +304 -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,34 @@
|
|
1
|
+
###########################################################################
|
2
|
+
#
|
3
|
+
# RESOURCE.CFG - Sample Resource File for Nagios 3.2.0
|
4
|
+
#
|
5
|
+
# Last Modified: 09-10-2003
|
6
|
+
#
|
7
|
+
# You can define $USERx$ macros in this file, which can in turn be used
|
8
|
+
# in command definitions in your host config file(s). $USERx$ macros are
|
9
|
+
# useful for storing sensitive information such as usernames, passwords,
|
10
|
+
# etc. They are also handy for specifying the path to plugins and
|
11
|
+
# event handlers - if you decide to move the plugins or event handlers to
|
12
|
+
# a different directory in the future, you can just update one or two
|
13
|
+
# $USERx$ macros, instead of modifying a lot of command definitions.
|
14
|
+
#
|
15
|
+
# The CGIs will not attempt to read the contents of resource files, so
|
16
|
+
# you can set restrictive permissions (600 or 660) on them.
|
17
|
+
#
|
18
|
+
# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
|
19
|
+
#
|
20
|
+
# Resource files may also be used to store configuration directives for
|
21
|
+
# external data sources like MySQL...
|
22
|
+
#
|
23
|
+
###########################################################################
|
24
|
+
|
25
|
+
# Sets $USER1$ to be the path to the plugins
|
26
|
+
$USER1$=/usr/local/nagios/libexec
|
27
|
+
|
28
|
+
# Sets $USER2$ to be the path to event handlers
|
29
|
+
#$USER2$=/usr/local/nagios/libexec/eventhandlers
|
30
|
+
|
31
|
+
# Store some usernames and passwords (hidden from the CGIs)
|
32
|
+
#$USER3$=someuser
|
33
|
+
#$USER4$=somepassword
|
34
|
+
|
@@ -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
|
+
|
8
|
+
<% network_number_of_ports.to_i.times do |port| %>
|
9
|
+
# The primary network interface
|
10
|
+
auto <%= "eth#{port}" %>
|
11
|
+
iface <%= "eth#{port}" %> inet static
|
12
|
+
address <%= network_interfaces[port][:address] %>
|
13
|
+
netmask <%= network_interfaces[port][:netmask] %>
|
14
|
+
broadcast <%= network_interfaces[port][:broadcast] %>
|
15
|
+
<%= "gateway #{network_gateway}" if port == 0 %>
|
16
|
+
<%= "dns-nameservers #{network_dns_nameservers}" if port == 0 %>
|
17
|
+
|
18
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= shared_path %>/log/*access.log <%= shared_path %>/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,125 @@
|
|
1
|
+
|
2
|
+
user <%= nginx_user %>;
|
3
|
+
worker_processes <%= nginx_worker_processes %>;
|
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
|
+
server_names_hash_bucket_size 512;
|
20
|
+
include /usr/local/nginx/conf/vhosts/*.conf;
|
21
|
+
include conf/mime.types;
|
22
|
+
default_type application/octet-stream;
|
23
|
+
|
24
|
+
#log_format main '$remote_addr - $remote_user [$time_local] $request '
|
25
|
+
# '"$status" $body_bytes_sent "$http_referer" '
|
26
|
+
# '"$http_user_agent" "$http_x_forwarded_for"';
|
27
|
+
|
28
|
+
#access_log logs/access.log main;
|
29
|
+
|
30
|
+
sendfile on;
|
31
|
+
tcp_nopush on;
|
32
|
+
|
33
|
+
#keepalive_timeout 0;
|
34
|
+
keepalive_timeout 65;
|
35
|
+
|
36
|
+
gzip on;
|
37
|
+
gzip_http_version 1.0;
|
38
|
+
gzip_comp_level 5; # 0 - 10, More is heavier on the CPU
|
39
|
+
gzip_proxied any;
|
40
|
+
gzip_buffers 16 8k;
|
41
|
+
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
42
|
+
|
43
|
+
server {
|
44
|
+
listen 80;
|
45
|
+
server_name localhost;
|
46
|
+
|
47
|
+
#charset koi8-r;
|
48
|
+
|
49
|
+
#access_log logs/host.access.log main;
|
50
|
+
|
51
|
+
location / {
|
52
|
+
root html;
|
53
|
+
index index.html index.htm;
|
54
|
+
}
|
55
|
+
|
56
|
+
#error_page 404 /404.html;
|
57
|
+
|
58
|
+
# redirect server error pages to the static page /50x.html
|
59
|
+
#
|
60
|
+
error_page 500 502 503 504 /50x.html;
|
61
|
+
location = /50x.html {
|
62
|
+
root html;
|
63
|
+
}
|
64
|
+
|
65
|
+
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
66
|
+
#
|
67
|
+
#location ~ \.php$ {
|
68
|
+
# proxy_pass http://127.0.0.1;
|
69
|
+
#}
|
70
|
+
|
71
|
+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
72
|
+
#
|
73
|
+
#location ~ \.php$ {
|
74
|
+
# fastcgi_pass 127.0.0.1:9000;
|
75
|
+
# fastcgi_index index.php;
|
76
|
+
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
77
|
+
# include conf/fastcgi_params;
|
78
|
+
#}
|
79
|
+
|
80
|
+
# deny access to .htaccess files, if Apache's document root
|
81
|
+
# concurs with nginx's one
|
82
|
+
#
|
83
|
+
#location ~ /\.ht {
|
84
|
+
# deny all;
|
85
|
+
#}
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
# another virtual host using mix of IP-, name-, and port-based configuration
|
90
|
+
#
|
91
|
+
#server {
|
92
|
+
# listen 8000;
|
93
|
+
# listen somename:8080;
|
94
|
+
# server_name somename alias another.alias;
|
95
|
+
|
96
|
+
# location / {
|
97
|
+
# root html;
|
98
|
+
# index index.html index.htm;
|
99
|
+
# }
|
100
|
+
#}
|
101
|
+
|
102
|
+
|
103
|
+
# HTTPS server
|
104
|
+
#
|
105
|
+
#server {
|
106
|
+
# listen 443;
|
107
|
+
# server_name localhost;
|
108
|
+
|
109
|
+
# ssl on;
|
110
|
+
# ssl_certificate cert.pem;
|
111
|
+
# ssl_certificate_key cert.key;
|
112
|
+
|
113
|
+
# ssl_session_timeout 5m;
|
114
|
+
|
115
|
+
# ssl_protocols SSLv2 SSLv3 TLSv1;
|
116
|
+
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
|
117
|
+
# ssl_prefer_server_ciphers on;
|
118
|
+
|
119
|
+
# location / {
|
120
|
+
# root html;
|
121
|
+
# index index.html index.htm;
|
122
|
+
# }
|
123
|
+
#}
|
124
|
+
|
125
|
+
}
|