peony 0.0.2 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +31 -1
- data/lib/peony/default.rb +2 -0
- data/lib/peony/settings.rb +5 -3
- data/lib/peony/utils.rb +25 -11
- data/lib/peony/version.rb +1 -1
- data/recipes/db/mongo.rake +59 -0
- data/recipes/db/mysql.rake +55 -0
- data/recipes/db/pg.rake +7 -9
- data/recipes/db/redis.rake +36 -0
- data/recipes/elasticsearch.rake +28 -0
- data/recipes/httpd.rake +42 -0
- data/recipes/nginx/www.rake +5 -3
- data/recipes/nginx.rake +4 -6
- data/recipes/php.rake +30 -0
- data/spec/settings_spec.rb +5 -3
- data/templates/elasticsearch/config.yml.erb +364 -0
- data/templates/elasticsearch/logging.yml.erb +54 -0
- data/templates/httpd/extra/httpd-autoindex.conf.erb +93 -0
- data/templates/httpd/extra/httpd-dav.conf.erb +56 -0
- data/templates/httpd/extra/httpd-info.conf.erb +37 -0
- data/templates/httpd/extra/httpd-languages.conf.erb +141 -0
- data/templates/httpd/extra/httpd-mpm.conf.erb +110 -0
- data/templates/httpd/extra/httpd-multilang-errordoc.conf.erb +52 -0
- data/templates/httpd/httpd.conf.erb +467 -0
- data/templates/httpd/magic.erb +382 -0
- data/templates/httpd/mime.types.erb +1357 -0
- data/templates/mongo/master.conf.erb +19 -0
- data/templates/mongo/slave.conf.erb +21 -0
- data/templates/mysql/my.cnf.erb +34 -0
- data/templates/nginx/sites-enabled/php.conf.erb +12 -0
- data/templates/redis.conf.erb +624 -0
- metadata +24 -3
- data/lib/peony/template_binding.rb +0 -22
@@ -0,0 +1,141 @@
|
|
1
|
+
#
|
2
|
+
# Settings for hosting different languages.
|
3
|
+
#
|
4
|
+
# Required modules: mod_mime, mod_negotiation
|
5
|
+
|
6
|
+
# DefaultLanguage and AddLanguage allows you to specify the language of
|
7
|
+
# a document. You can then use content negotiation to give a browser a
|
8
|
+
# file in a language the user can understand.
|
9
|
+
#
|
10
|
+
# Specify a default language. This means that all data
|
11
|
+
# going out without a specific language tag (see below) will
|
12
|
+
# be marked with this one. You probably do NOT want to set
|
13
|
+
# this unless you are sure it is correct for all cases.
|
14
|
+
#
|
15
|
+
# * It is generally better to not mark a page as
|
16
|
+
# * being a certain language than marking it with the wrong
|
17
|
+
# * language!
|
18
|
+
#
|
19
|
+
# DefaultLanguage nl
|
20
|
+
#
|
21
|
+
# Note 1: The suffix does not have to be the same as the language
|
22
|
+
# keyword --- those with documents in Polish (whose net-standard
|
23
|
+
# language code is pl) may wish to use "AddLanguage pl .po" to
|
24
|
+
# avoid the ambiguity with the common suffix for perl scripts.
|
25
|
+
#
|
26
|
+
# Note 2: The example entries below illustrate that in some cases
|
27
|
+
# the two character 'Language' abbreviation is not identical to
|
28
|
+
# the two character 'Country' code for its country,
|
29
|
+
# E.g. 'Danmark/dk' versus 'Danish/da'.
|
30
|
+
#
|
31
|
+
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
|
32
|
+
# specifier. There is 'work in progress' to fix this and get
|
33
|
+
# the reference data for rfc1766 cleaned up.
|
34
|
+
#
|
35
|
+
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
|
36
|
+
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
|
37
|
+
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
|
38
|
+
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
|
39
|
+
# Norwegian (no) - Polish (pl) - Portugese (pt)
|
40
|
+
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
|
41
|
+
# Turkish (tr) - Simplified Chinese (zh-CN) - Spanish (es)
|
42
|
+
# Traditional Chinese (zh-TW)
|
43
|
+
#
|
44
|
+
AddLanguage ca .ca
|
45
|
+
AddLanguage cs .cz .cs
|
46
|
+
AddLanguage da .dk
|
47
|
+
AddLanguage de .de
|
48
|
+
AddLanguage el .el
|
49
|
+
AddLanguage en .en
|
50
|
+
AddLanguage eo .eo
|
51
|
+
AddLanguage es .es
|
52
|
+
AddLanguage et .et
|
53
|
+
AddLanguage fr .fr
|
54
|
+
AddLanguage he .he
|
55
|
+
AddLanguage hr .hr
|
56
|
+
AddLanguage it .it
|
57
|
+
AddLanguage ja .ja
|
58
|
+
AddLanguage ko .ko
|
59
|
+
AddLanguage ltz .ltz
|
60
|
+
AddLanguage nl .nl
|
61
|
+
AddLanguage nn .nn
|
62
|
+
AddLanguage no .no
|
63
|
+
AddLanguage pl .po
|
64
|
+
AddLanguage pt .pt
|
65
|
+
AddLanguage pt-BR .pt-br
|
66
|
+
AddLanguage ru .ru
|
67
|
+
AddLanguage sv .sv
|
68
|
+
AddLanguage tr .tr
|
69
|
+
AddLanguage zh-CN .zh-cn
|
70
|
+
AddLanguage zh-TW .zh-tw
|
71
|
+
|
72
|
+
# LanguagePriority allows you to give precedence to some languages
|
73
|
+
# in case of a tie during content negotiation.
|
74
|
+
#
|
75
|
+
# Just list the languages in decreasing order of preference. We have
|
76
|
+
# more or less alphabetized them here. You probably want to change this.
|
77
|
+
#
|
78
|
+
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW
|
79
|
+
|
80
|
+
#
|
81
|
+
# ForceLanguagePriority allows you to serve a result page rather than
|
82
|
+
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
|
83
|
+
# [in case no accepted languages matched the available variants]
|
84
|
+
#
|
85
|
+
ForceLanguagePriority Prefer Fallback
|
86
|
+
|
87
|
+
#
|
88
|
+
# Commonly used filename extensions to character sets. You probably
|
89
|
+
# want to avoid clashes with the language extensions, unless you
|
90
|
+
# are good at carefully testing your setup after each change.
|
91
|
+
# See http://www.iana.org/assignments/character-sets for the
|
92
|
+
# official list of charset names and their respective RFCs.
|
93
|
+
#
|
94
|
+
AddCharset us-ascii.ascii .us-ascii
|
95
|
+
AddCharset ISO-8859-1 .iso8859-1 .latin1
|
96
|
+
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
|
97
|
+
AddCharset ISO-8859-3 .iso8859-3 .latin3
|
98
|
+
AddCharset ISO-8859-4 .iso8859-4 .latin4
|
99
|
+
AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru
|
100
|
+
AddCharset ISO-8859-6 .iso8859-6 .arb .arabic
|
101
|
+
AddCharset ISO-8859-7 .iso8859-7 .grk .greek
|
102
|
+
AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew
|
103
|
+
AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk
|
104
|
+
AddCharset ISO-8859-10 .iso8859-10 .latin6
|
105
|
+
AddCharset ISO-8859-13 .iso8859-13
|
106
|
+
AddCharset ISO-8859-14 .iso8859-14 .latin8
|
107
|
+
AddCharset ISO-8859-15 .iso8859-15 .latin9
|
108
|
+
AddCharset ISO-8859-16 .iso8859-16 .latin10
|
109
|
+
AddCharset ISO-2022-JP .iso2022-jp .jis
|
110
|
+
AddCharset ISO-2022-KR .iso2022-kr .kis
|
111
|
+
AddCharset ISO-2022-CN .iso2022-cn .cis
|
112
|
+
AddCharset Big5.Big5 .big5 .b5
|
113
|
+
AddCharset cn-Big5 .cn-big5
|
114
|
+
# For russian, more than one charset is used (depends on client, mostly):
|
115
|
+
AddCharset WINDOWS-1251 .cp-1251 .win-1251
|
116
|
+
AddCharset CP866 .cp866
|
117
|
+
AddCharset KOI8 .koi8
|
118
|
+
AddCharset KOI8-E .koi8-e
|
119
|
+
AddCharset KOI8-r .koi8-r .koi8-ru
|
120
|
+
AddCharset KOI8-U .koi8-u
|
121
|
+
AddCharset KOI8-ru .koi8-uk .ua
|
122
|
+
AddCharset ISO-10646-UCS-2 .ucs2
|
123
|
+
AddCharset ISO-10646-UCS-4 .ucs4
|
124
|
+
AddCharset UTF-7 .utf7
|
125
|
+
AddCharset UTF-8 .utf8
|
126
|
+
AddCharset UTF-16 .utf16
|
127
|
+
AddCharset UTF-16BE .utf16be
|
128
|
+
AddCharset UTF-16LE .utf16le
|
129
|
+
AddCharset UTF-32 .utf32
|
130
|
+
AddCharset UTF-32BE .utf32be
|
131
|
+
AddCharset UTF-32LE .utf32le
|
132
|
+
AddCharset euc-cn .euc-cn
|
133
|
+
AddCharset euc-gb .euc-gb
|
134
|
+
AddCharset euc-jp .euc-jp
|
135
|
+
AddCharset euc-kr .euc-kr
|
136
|
+
#Not sure how euc-tw got in - IANA doesn't list it???
|
137
|
+
AddCharset EUC-TW .euc-tw
|
138
|
+
AddCharset gb2312 .gb2312 .gb
|
139
|
+
AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
|
140
|
+
AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
|
141
|
+
AddCharset shift_jis .shift_jis .sjis
|
@@ -0,0 +1,110 @@
|
|
1
|
+
#
|
2
|
+
# Server-Pool Management (MPM specific)
|
3
|
+
#
|
4
|
+
|
5
|
+
#
|
6
|
+
# PidFile: The file in which the server should record its process
|
7
|
+
# identification number when it starts.
|
8
|
+
#
|
9
|
+
# Note that this is the default PidFile for most MPMs.
|
10
|
+
#
|
11
|
+
<IfModule !mpm_netware_module>
|
12
|
+
PidFile "<%= run_dir %>/httpd.pid"
|
13
|
+
</IfModule>
|
14
|
+
|
15
|
+
#
|
16
|
+
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
|
17
|
+
#
|
18
|
+
<IfModule !mpm_winnt_module>
|
19
|
+
<IfModule !mpm_netware_module>
|
20
|
+
LockFile "<%= httpd_log_dir %>/accept.lock"
|
21
|
+
</IfModule>
|
22
|
+
</IfModule>
|
23
|
+
|
24
|
+
#
|
25
|
+
# Only one of the below sections will be relevant on your
|
26
|
+
# installed httpd. Use "apachectl -l" to find out the
|
27
|
+
# active mpm.
|
28
|
+
#
|
29
|
+
|
30
|
+
# prefork MPM
|
31
|
+
# StartServers: number of server processes to start
|
32
|
+
# MinSpareServers: minimum number of server processes which are kept spare
|
33
|
+
# MaxSpareServers: maximum number of server processes which are kept spare
|
34
|
+
# MaxClients: maximum number of server processes allowed to start
|
35
|
+
# MaxRequestsPerChild: maximum number of requests a server process serves
|
36
|
+
<IfModule mpm_prefork_module>
|
37
|
+
StartServers 1
|
38
|
+
MinSpareServers 1
|
39
|
+
MaxSpareServers 10
|
40
|
+
MaxClients 150
|
41
|
+
MaxRequestsPerChild 0
|
42
|
+
</IfModule>
|
43
|
+
|
44
|
+
# worker MPM
|
45
|
+
# StartServers: initial number of server processes to start
|
46
|
+
# MaxClients: maximum number of simultaneous client connections
|
47
|
+
# MinSpareThreads: minimum number of worker threads which are kept spare
|
48
|
+
# MaxSpareThreads: maximum number of worker threads which are kept spare
|
49
|
+
# ThreadsPerChild: constant number of worker threads in each server process
|
50
|
+
# MaxRequestsPerChild: maximum number of requests a server process serves
|
51
|
+
<IfModule mpm_worker_module>
|
52
|
+
StartServers 2
|
53
|
+
MaxClients 150
|
54
|
+
MinSpareThreads 25
|
55
|
+
MaxSpareThreads 75
|
56
|
+
ThreadsPerChild 25
|
57
|
+
MaxRequestsPerChild 0
|
58
|
+
</IfModule>
|
59
|
+
|
60
|
+
# BeOS MPM
|
61
|
+
# StartThreads: how many threads do we initially spawn?
|
62
|
+
# MaxClients: max number of threads we can have (1 thread == 1 client)
|
63
|
+
# MaxRequestsPerThread: maximum number of requests each thread will process
|
64
|
+
<IfModule mpm_beos_module>
|
65
|
+
StartThreads 10
|
66
|
+
MaxClients 50
|
67
|
+
MaxRequestsPerThread 10000
|
68
|
+
</IfModule>
|
69
|
+
|
70
|
+
# NetWare MPM
|
71
|
+
# ThreadStackSize: Stack size allocated for each worker thread
|
72
|
+
# StartThreads: Number of worker threads launched at server startup
|
73
|
+
# MinSpareThreads: Minimum number of idle threads, to handle request spikes
|
74
|
+
# MaxSpareThreads: Maximum number of idle threads
|
75
|
+
# MaxThreads: Maximum number of worker threads alive at the same time
|
76
|
+
# MaxRequestsPerChild: Maximum number of requests a thread serves. It is
|
77
|
+
# recommended that the default value of 0 be set for this
|
78
|
+
# directive on NetWare. This will allow the thread to
|
79
|
+
# continue to service requests indefinitely.
|
80
|
+
<IfModule mpm_netware_module>
|
81
|
+
ThreadStackSize 65536
|
82
|
+
StartThreads 250
|
83
|
+
MinSpareThreads 25
|
84
|
+
MaxSpareThreads 250
|
85
|
+
MaxThreads 1000
|
86
|
+
MaxRequestsPerChild 0
|
87
|
+
MaxMemFree 100
|
88
|
+
</IfModule>
|
89
|
+
|
90
|
+
# OS/2 MPM
|
91
|
+
# StartServers: Number of server processes to maintain
|
92
|
+
# MinSpareThreads: Minimum number of idle threads per process,
|
93
|
+
# to handle request spikes
|
94
|
+
# MaxSpareThreads: Maximum number of idle threads per process
|
95
|
+
# MaxRequestsPerChild: Maximum number of connections per server process
|
96
|
+
<IfModule mpm_mpmt_os2_module>
|
97
|
+
StartServers 2
|
98
|
+
MinSpareThreads 5
|
99
|
+
MaxSpareThreads 10
|
100
|
+
MaxRequestsPerChild 0
|
101
|
+
</IfModule>
|
102
|
+
|
103
|
+
# WinNT MPM
|
104
|
+
# ThreadsPerChild: constant number of worker threads in the server process
|
105
|
+
# MaxRequestsPerChild: maximum number of requests a server process serves
|
106
|
+
<IfModule mpm_winnt_module>
|
107
|
+
ThreadsPerChild 150
|
108
|
+
MaxRequestsPerChild 0
|
109
|
+
</IfModule>
|
110
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#
|
2
|
+
# The configuration below implements multi-language error documents through
|
3
|
+
# content-negotiation.
|
4
|
+
#
|
5
|
+
# Required modules: mod_alias, mod_include, mod_negotiation
|
6
|
+
#
|
7
|
+
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
|
8
|
+
# our collection of by-error message multi-language collections. We use
|
9
|
+
# includes to substitute the appropriate text.
|
10
|
+
#
|
11
|
+
# You can modify the messages' appearance without changing any of the
|
12
|
+
# default HTTP_<error>.html.var files by adding the line:
|
13
|
+
#
|
14
|
+
# Alias /error/include/ "/your/include/path/"
|
15
|
+
#
|
16
|
+
# which allows you to create your own set of files by starting with the
|
17
|
+
# /usr/share/httpd/error/include/ files and copying them to /your/include/path/,
|
18
|
+
# even on a per-VirtualHost basis. The default include files will display
|
19
|
+
# your Apache version number and your ServerAdmin email address regardless
|
20
|
+
# of the setting of ServerSignature.
|
21
|
+
|
22
|
+
Alias /error/ "<%= httpd_share_dir %>/error/"
|
23
|
+
|
24
|
+
<Directory "<%= httpd_share_dir %>/error">
|
25
|
+
AllowOverride None
|
26
|
+
Options IncludesNoExec
|
27
|
+
AddOutputFilter Includes html
|
28
|
+
AddHandler type-map var
|
29
|
+
Order allow,deny
|
30
|
+
Allow from all
|
31
|
+
LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
|
32
|
+
ForceLanguagePriority Prefer Fallback
|
33
|
+
</Directory>
|
34
|
+
|
35
|
+
ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
|
36
|
+
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
|
37
|
+
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
|
38
|
+
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
|
39
|
+
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
|
40
|
+
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
|
41
|
+
ErrorDocument 410 /error/HTTP_GONE.html.var
|
42
|
+
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
|
43
|
+
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
|
44
|
+
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
|
45
|
+
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
|
46
|
+
ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
|
47
|
+
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
|
48
|
+
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
|
49
|
+
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
|
50
|
+
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
|
51
|
+
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
|
52
|
+
|