peony 0.1.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/peony +2 -2
- data/lib/peony/actions.rb +66 -20
- data/lib/peony/{utils.rb → configure.rb} +13 -40
- data/lib/peony/default.rb +9 -2
- data/lib/peony/rake.rb +1 -1
- data/lib/peony/scope.rb +82 -0
- data/lib/peony/settings.rb +24 -23
- data/lib/peony/shell/basic.rb +19 -17
- data/lib/peony/shell.rb +3 -4
- data/lib/peony/version.rb +1 -1
- data/lib/peony.rb +6 -3
- data/recipes/db/mongo.rake +26 -26
- data/recipes/db/mysql.rake +46 -28
- data/recipes/db/pg.rake +20 -17
- data/recipes/db/redis.rake +22 -20
- data/recipes/elasticsearch.rake +14 -12
- data/recipes/httpd.rake +20 -18
- data/recipes/nginx/www.rake +8 -6
- data/recipes/nginx.rake +25 -23
- data/recipes/php.rake +10 -5
- data/spec/peony_spec.rb +3 -0
- data/spec/scope_spec.rb +48 -0
- data/spec/settings_in_rake_spec.rb +61 -1
- data/spec/settings_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -3
- data/templates/elasticsearch/config.yml.erb +48 -34
- data/templates/elasticsearch/logging.yml.erb +3 -1
- data/templates/httpd/extra/httpd-autoindex.conf.erb +2 -2
- data/templates/httpd/extra/httpd-dav.conf.erb +4 -4
- data/templates/httpd/extra/httpd-mpm.conf.erb +1 -1
- data/templates/httpd/extra/httpd-multilang-errordoc.conf.erb +2 -2
- data/templates/httpd/httpd.conf.erb +8 -8
- data/templates/mongo/master.conf.erb +8 -8
- data/templates/mongo/slave.conf.erb +9 -9
- data/templates/mysql/my.cnf.erb +48 -34
- data/templates/nginx/sites-enabled/php.conf.erb +7 -7
- data/templates/nginx/sites-enabled/static.conf.erb +4 -4
- data/templates/nginx/www.conf.erb +77 -77
- data/templates/redis.conf.erb +13 -13
- metadata +6 -3
@@ -1,13 +1,13 @@
|
|
1
|
-
#####################
|
1
|
+
##################### Elasticsearch Configuration Example #####################
|
2
2
|
|
3
3
|
# This file contains an overview of various configuration settings,
|
4
4
|
# targeted at operations staff. Application developers should
|
5
5
|
# consult the guide at <http://elasticsearch.org/guide>.
|
6
6
|
#
|
7
7
|
# The installation procedure is covered at
|
8
|
-
# <http://elasticsearch.org/guide/reference/setup
|
8
|
+
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
|
9
9
|
#
|
10
|
-
#
|
10
|
+
# Elasticsearch comes with reasonable defaults for most settings,
|
11
11
|
# so you can try it out without bothering with configuration.
|
12
12
|
#
|
13
13
|
# Most of the time, these defaults are just fine for running a production
|
@@ -20,8 +20,8 @@
|
|
20
20
|
#
|
21
21
|
# node.rack: ${RACK_ENV_VAR}
|
22
22
|
|
23
|
-
#
|
24
|
-
#
|
23
|
+
# For information on supported formats and syntax for the config file, see
|
24
|
+
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html>
|
25
25
|
|
26
26
|
|
27
27
|
################################### Cluster ###################################
|
@@ -29,7 +29,7 @@
|
|
29
29
|
# Cluster name identifies your cluster for auto-discovery. If you're running
|
30
30
|
# multiple clusters on the same network, make sure you're using unique names.
|
31
31
|
#
|
32
|
-
cluster.name: <%=
|
32
|
+
cluster.name: <%= es.cluster_name %>
|
33
33
|
|
34
34
|
|
35
35
|
#################################### Node #####################################
|
@@ -72,8 +72,10 @@ cluster.name: <%= es_cluster_name %>
|
|
72
72
|
# node.data: false
|
73
73
|
|
74
74
|
# Use the Cluster Health API [http://localhost:9200/_cluster/health], the
|
75
|
-
# Node Info API [http://localhost:9200/
|
76
|
-
# such as <http://
|
75
|
+
# Node Info API [http://localhost:9200/_nodes] or GUI tools
|
76
|
+
# such as <http://www.elasticsearch.org/overview/marvel/>,
|
77
|
+
# <http://github.com/karmi/elasticsearch-paramedic>,
|
78
|
+
# <http://github.com/lukas-vlcek/bigdesk> and
|
77
79
|
# <http://mobz.github.com/elasticsearch-head> to inspect the cluster state.
|
78
80
|
|
79
81
|
# A node can have generic attributes associated with it, which can later be used
|
@@ -96,8 +98,8 @@ cluster.name: <%= es_cluster_name %>
|
|
96
98
|
# Note, that it makes more sense to configure index settings specifically for
|
97
99
|
# a certain index, either when creating it or by using the index templates API.
|
98
100
|
#
|
99
|
-
# See <http://elasticsearch.org/guide/reference/index-modules
|
100
|
-
# <http://elasticsearch.org/guide/reference/
|
101
|
+
# See <http://elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html> and
|
102
|
+
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html>
|
101
103
|
# for more information.
|
102
104
|
|
103
105
|
# Set the number of shards (splits) of an index (5 by default):
|
@@ -128,7 +130,7 @@ cluster.name: <%= es_cluster_name %>
|
|
128
130
|
# The "number_of_replicas" can be increased or decreased anytime,
|
129
131
|
# by using the Index Update Settings API.
|
130
132
|
#
|
131
|
-
#
|
133
|
+
# Elasticsearch takes care about load balancing, relocating, gathering the
|
132
134
|
# results from nodes, etc. Experiment with different settings to fine-tune
|
133
135
|
# your setup.
|
134
136
|
|
@@ -144,7 +146,7 @@ cluster.name: <%= es_cluster_name %>
|
|
144
146
|
|
145
147
|
# Path to directory where to store index data allocated for this node.
|
146
148
|
#
|
147
|
-
path.data: <%=
|
149
|
+
path.data: <%= es.data_dir %>
|
148
150
|
#
|
149
151
|
# Can optionally include more than one location, causing data to be striped across
|
150
152
|
# the locations (a la RAID 0) on a file level, favouring locations with most free
|
@@ -162,7 +164,7 @@ path.logs: <%= log_dir %>/elasticsearch/
|
|
162
164
|
|
163
165
|
# Path to where plugins are installed:
|
164
166
|
#
|
165
|
-
path.plugins: <%=
|
167
|
+
path.plugins: <%= es.plugins_dir %>
|
166
168
|
|
167
169
|
|
168
170
|
#################################### Plugin ###################################
|
@@ -174,7 +176,7 @@ path.plugins: <%= es_plugins_dir %>
|
|
174
176
|
|
175
177
|
################################### Memory ####################################
|
176
178
|
|
177
|
-
#
|
179
|
+
# Elasticsearch performs poorly when JVM starts swapping: you should ensure that
|
178
180
|
# it _never_ swaps.
|
179
181
|
#
|
180
182
|
# Set this property to true to lock the memory:
|
@@ -183,15 +185,15 @@ path.plugins: <%= es_plugins_dir %>
|
|
183
185
|
|
184
186
|
# Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set
|
185
187
|
# to the same value, and that the machine has enough memory to allocate
|
186
|
-
# for
|
188
|
+
# for Elasticsearch, leaving enough memory for the operating system itself.
|
187
189
|
#
|
188
|
-
# You should also make sure that the
|
190
|
+
# You should also make sure that the Elasticsearch process is allowed to lock
|
189
191
|
# the memory, eg. by using `ulimit -l unlimited`.
|
190
192
|
|
191
193
|
|
192
194
|
############################## Network And HTTP ###############################
|
193
195
|
|
194
|
-
#
|
196
|
+
# Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens
|
195
197
|
# on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
|
196
198
|
# communication. (the range means that if the port is busy, it will automatically
|
197
199
|
# try the next port).
|
@@ -207,7 +209,7 @@ path.plugins: <%= es_plugins_dir %>
|
|
207
209
|
|
208
210
|
# Set both 'bind_host' and 'publish_host':
|
209
211
|
#
|
210
|
-
network.host: <%=
|
212
|
+
network.host: <%= es.network_host %>
|
211
213
|
|
212
214
|
# Set a custom port for the node to node communication (9300 by default):
|
213
215
|
#
|
@@ -237,8 +239,8 @@ network.host: <%= es_network_host %>
|
|
237
239
|
# in the gateway, and when the cluster starts up for the first time,
|
238
240
|
# it will read its state from the gateway.
|
239
241
|
|
240
|
-
# There are several types of gateway implementations. For more information,
|
241
|
-
#
|
242
|
+
# There are several types of gateway implementations. For more information, see
|
243
|
+
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-gateway.html>.
|
242
244
|
|
243
245
|
# The default gateway type is the "local" gateway (recommended):
|
244
246
|
#
|
@@ -296,8 +298,8 @@ network.host: <%= es_network_host %>
|
|
296
298
|
# and master node is elected. Multicast discovery is the default.
|
297
299
|
|
298
300
|
# Set to ensure a node sees N other master eligible nodes to be considered
|
299
|
-
# operational within the cluster.
|
300
|
-
#
|
301
|
+
# operational within the cluster. Its recommended to set it to a higher value
|
302
|
+
# than 1 when running more than 2 nodes in the cluster.
|
301
303
|
#
|
302
304
|
# discovery.zen.minimum_master_nodes: 1
|
303
305
|
|
@@ -307,8 +309,8 @@ network.host: <%= es_network_host %>
|
|
307
309
|
#
|
308
310
|
# discovery.zen.ping.timeout: 3s
|
309
311
|
|
310
|
-
#
|
311
|
-
#
|
312
|
+
# For more information, see
|
313
|
+
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html>
|
312
314
|
|
313
315
|
# Unicast discovery allows to explicitly control which nodes will be used
|
314
316
|
# to discover the cluster. It can be used when multicast is not present,
|
@@ -321,18 +323,29 @@ network.host: <%= es_network_host %>
|
|
321
323
|
# 2. Configure an initial list of master nodes in the cluster
|
322
324
|
# to perform discovery when new nodes (master or data) are started:
|
323
325
|
#
|
324
|
-
# discovery.zen.ping.unicast.hosts: ["host1", "host2:port"
|
326
|
+
# discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
|
325
327
|
|
326
328
|
# EC2 discovery allows to use AWS EC2 API in order to perform discovery.
|
327
329
|
#
|
328
330
|
# You have to install the cloud-aws plugin for enabling the EC2 discovery.
|
329
331
|
#
|
330
|
-
#
|
331
|
-
#
|
332
|
+
# For more information, see
|
333
|
+
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-ec2.html>
|
332
334
|
#
|
333
|
-
# See <http://elasticsearch.org/tutorials/
|
335
|
+
# See <http://elasticsearch.org/tutorials/elasticsearch-on-ec2/>
|
334
336
|
# for a step-by-step tutorial.
|
335
337
|
|
338
|
+
# GCE discovery allows to use Google Compute Engine API in order to perform discovery.
|
339
|
+
#
|
340
|
+
# You have to install the cloud-gce plugin for enabling the GCE discovery.
|
341
|
+
#
|
342
|
+
# For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-gce>.
|
343
|
+
|
344
|
+
# Azure discovery allows to use Azure API in order to perform discovery.
|
345
|
+
#
|
346
|
+
# You have to install the cloud-azure plugin for enabling the Azure discovery.
|
347
|
+
#
|
348
|
+
# For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-azure>.
|
336
349
|
|
337
350
|
################################## Slow Log ##################################
|
338
351
|
|
@@ -355,10 +368,11 @@ network.host: <%= es_network_host %>
|
|
355
368
|
|
356
369
|
################################## GC Logging ################################
|
357
370
|
|
358
|
-
#monitor.jvm.gc.
|
359
|
-
#monitor.jvm.gc.
|
360
|
-
#monitor.jvm.gc.
|
371
|
+
#monitor.jvm.gc.young.warn: 1000ms
|
372
|
+
#monitor.jvm.gc.young.info: 700ms
|
373
|
+
#monitor.jvm.gc.young.debug: 400ms
|
374
|
+
|
375
|
+
#monitor.jvm.gc.old.warn: 10s
|
376
|
+
#monitor.jvm.gc.old.info: 5s
|
377
|
+
#monitor.jvm.gc.old.debug: 2s
|
361
378
|
|
362
|
-
#monitor.jvm.gc.ConcurrentMarkSweep.warn: 10s
|
363
|
-
#monitor.jvm.gc.ConcurrentMarkSweep.info: 5s
|
364
|
-
#monitor.jvm.gc.ConcurrentMarkSweep.debug: 2s
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
|
2
|
+
es.logger.level: INFO
|
3
|
+
rootLogger: ${es.logger.level}, console, file
|
2
4
|
logger:
|
3
5
|
# log action execution errors for easier debugging
|
4
6
|
action: DEBUG
|
@@ -17,9 +17,9 @@ IndexOptions FancyIndexing HTMLTable VersionSort
|
|
17
17
|
# We include the /icons/ alias for FancyIndexed directory listings. If
|
18
18
|
# you do not use FancyIndexing, you may comment this out.
|
19
19
|
#
|
20
|
-
Alias /icons/ "<%=
|
20
|
+
Alias /icons/ "<%= httpd.share_dir %>/icons/"
|
21
21
|
|
22
|
-
<Directory "<%=
|
22
|
+
<Directory "<%= httpd.share_dir %>/icons">
|
23
23
|
Options Indexes MultiViews
|
24
24
|
AllowOverride None
|
25
25
|
Order allow,deny
|
@@ -12,11 +12,11 @@
|
|
12
12
|
# on the directory where the DavLockDB is placed and on any directory where
|
13
13
|
# "Dav On" is specified.
|
14
14
|
|
15
|
-
DavLockDB "<%= webdav_dir %>/DavLock"
|
15
|
+
DavLockDB "<%= httpd.webdav_dir %>/DavLock"
|
16
16
|
|
17
|
-
Alias /webdav "<%= webdav_dir %>"
|
17
|
+
Alias /webdav "<%= httpd.webdav_dir %>"
|
18
18
|
|
19
|
-
<Directory "<%= webdav_dir %>">
|
19
|
+
<Directory "<%= httpd.webdav_dir %>">
|
20
20
|
Dav On
|
21
21
|
Options +Indexes
|
22
22
|
IndexOptions FancyIndexing
|
@@ -31,7 +31,7 @@ Alias /webdav "<%= webdav_dir %>"
|
|
31
31
|
|
32
32
|
# You can use the htdigest program to create the password database:
|
33
33
|
# htdigest -c "/usr/user.passwd" DAV-upload admin
|
34
|
-
AuthUserFile "<%= auth_user_file %>"
|
34
|
+
AuthUserFile "<%= httpd.auth_user_file %>"
|
35
35
|
AuthDigestProvider file
|
36
36
|
|
37
37
|
# Allow universal read-access, but writes are restricted
|
@@ -19,9 +19,9 @@
|
|
19
19
|
# your Apache version number and your ServerAdmin email address regardless
|
20
20
|
# of the setting of ServerSignature.
|
21
21
|
|
22
|
-
Alias /error/ "<%=
|
22
|
+
Alias /error/ "<%= httpd.share_dir %>/error/"
|
23
23
|
|
24
|
-
<Directory "<%=
|
24
|
+
<Directory "<%= httpd.share_dir %>/error">
|
25
25
|
AllowOverride None
|
26
26
|
Options IncludesNoExec
|
27
27
|
AddOutputFilter Includes html
|
@@ -37,7 +37,7 @@ ServerRoot "/usr"
|
|
37
37
|
# prevent Apache from glomming onto all bound IP addresses.
|
38
38
|
#
|
39
39
|
#Listen 12.34.56.78:80
|
40
|
-
Listen <%=
|
40
|
+
Listen <%= httpd.port %>
|
41
41
|
|
42
42
|
#
|
43
43
|
# Dynamic Shared Object (DSO) Support
|
@@ -150,7 +150,7 @@ Group _www
|
|
150
150
|
# e-mailed. This address appears on some server-generated pages, such
|
151
151
|
# as error documents. e.g. admin@your-domain.com
|
152
152
|
#
|
153
|
-
ServerAdmin "<%=
|
153
|
+
ServerAdmin "<%= httpd.server_admin %>"
|
154
154
|
|
155
155
|
#
|
156
156
|
# ServerName gives the name and port that the server uses to identify itself.
|
@@ -159,7 +159,7 @@ ServerAdmin "<%= httpd_server_admin %>"
|
|
159
159
|
#
|
160
160
|
# If your host doesn't have a registered DNS name, enter its IP address here.
|
161
161
|
#
|
162
|
-
ServerName <%=
|
162
|
+
ServerName <%= httpd.server_name %>
|
163
163
|
|
164
164
|
#
|
165
165
|
# DocumentRoot: The directory out of which you will serve your
|
@@ -264,7 +264,7 @@ DocumentRoot "<%= www_dir %>"
|
|
264
264
|
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
265
265
|
# container, that host's errors will be logged there and not here.
|
266
266
|
#
|
267
|
-
ErrorLog "<%=
|
267
|
+
ErrorLog "<%= httpd.log_dir %>/error.log"
|
268
268
|
|
269
269
|
#
|
270
270
|
# LogLevel: Control the number of messages logged to the error_log.
|
@@ -293,7 +293,7 @@ LogLevel warn
|
|
293
293
|
# define per-<VirtualHost> access logfiles, transactions will be
|
294
294
|
# logged therein and *not* in this file.
|
295
295
|
#
|
296
|
-
CustomLog "<%=
|
296
|
+
CustomLog "<%= httpd.log_dir %>/access.log" common
|
297
297
|
|
298
298
|
#
|
299
299
|
# If you prefer a logfile with access, agent, and referer information
|
@@ -368,7 +368,7 @@ DefaultType text/plain
|
|
368
368
|
# TypesConfig points to the file containing the list of mappings from
|
369
369
|
# filename extension to MIME-type.
|
370
370
|
#
|
371
|
-
TypesConfig <%=
|
371
|
+
TypesConfig <%= httpd.etc_dir %>/mime.types
|
372
372
|
|
373
373
|
#
|
374
374
|
# AddType allows you to add to or override the MIME configuration
|
@@ -451,7 +451,7 @@ TraceEnable off
|
|
451
451
|
# necessary.
|
452
452
|
|
453
453
|
# Server-pool management (MPM specific)
|
454
|
-
Include <%=
|
454
|
+
Include <%= httpd.etc_dir %>/extra/*.conf
|
455
455
|
|
456
456
|
|
457
457
|
#
|
@@ -464,4 +464,4 @@ SSLRandomSeed startup builtin
|
|
464
464
|
SSLRandomSeed connect builtin
|
465
465
|
</IfModule>
|
466
466
|
|
467
|
-
#Include <%=
|
467
|
+
#Include <%= httpd.etc_dir %>/other/*.conf
|
@@ -1,19 +1,19 @@
|
|
1
|
-
# Store data in <%=
|
2
|
-
dbpath = <%=
|
1
|
+
# Store data in <%= mongo.master_dir %> instead of the default /data/db
|
2
|
+
dbpath = <%= mongo.master_dir %>
|
3
3
|
|
4
4
|
# Only accept local connections
|
5
5
|
#bind_ip = 127.0.0.1
|
6
6
|
|
7
|
-
logpath = <%=
|
7
|
+
logpath = <%= mongo.log_dir %>/<%= mongo.master_name %>.log
|
8
8
|
|
9
|
-
pidfilepath = <%=
|
9
|
+
pidfilepath = <%= mongo.run_dir %>/<%= mongo.master_name %>.pid
|
10
10
|
|
11
|
-
fork = <%=
|
11
|
+
fork = <%= mongo.fork %>
|
12
12
|
|
13
|
-
jsonp = <%=
|
13
|
+
jsonp = <%= mongo.jsonp %>
|
14
14
|
|
15
|
-
rest = <%=
|
15
|
+
rest = <%= mongo.rest %>
|
16
16
|
|
17
|
-
port = <%=
|
17
|
+
port = <%= mongo.master_port %>
|
18
18
|
|
19
19
|
master = true
|
@@ -1,21 +1,21 @@
|
|
1
|
-
# Store data in <%=
|
2
|
-
dbpath = <%=
|
1
|
+
# Store data in <%= mongo.slave_dir %> instead of the default /data/db
|
2
|
+
dbpath = <%= mongo.slave_dir %>
|
3
3
|
|
4
4
|
# Only accept local connections
|
5
5
|
#bind_ip = 127.0.0.1
|
6
6
|
|
7
|
-
logpath = <%=
|
7
|
+
logpath = <%= mongo.log_dir %>/<%= mongo.slave_name %>.log
|
8
8
|
|
9
|
-
pidfilepath = <%=
|
9
|
+
pidfilepath = <%= mongo.run_dir %>/<%= mongo.slave_name %>.pid
|
10
10
|
|
11
|
-
fork = <%=
|
11
|
+
fork = <%= mongo.fork %>
|
12
12
|
|
13
|
-
jsonp = <%=
|
13
|
+
jsonp = <%= mongo.jsonp %>
|
14
14
|
|
15
|
-
rest = <%=
|
15
|
+
rest = <%= mongo.rest %>
|
16
16
|
|
17
17
|
slave = true
|
18
18
|
|
19
|
-
port = <%=
|
19
|
+
port = <%= mongo.slave_port %>
|
20
20
|
|
21
|
-
source = <%=
|
21
|
+
source = <%= mongo.slave_source %>
|
data/templates/mysql/my.cnf.erb
CHANGED
@@ -1,34 +1,48 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
[
|
8
|
-
character-set
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
1
|
+
# For advice on how to change settings please see
|
2
|
+
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
|
3
|
+
|
4
|
+
[mysql]
|
5
|
+
default-character-set = <%= mysql.charset %>
|
6
|
+
|
7
|
+
[mysqlshow]
|
8
|
+
default-character-set = <%= mysql.charset %>
|
9
|
+
|
10
|
+
[mysqlimport]
|
11
|
+
default-character-set = <%= mysql.charset %>
|
12
|
+
|
13
|
+
[mysqlcheck]
|
14
|
+
default-character-set = <%= mysql.charset %>
|
15
|
+
|
16
|
+
[mysql_upgrade]
|
17
|
+
default-character-set = <%= mysql.charset %>
|
18
|
+
|
19
|
+
[mysqld]
|
20
|
+
|
21
|
+
# Remove leading # and set to the amount of RAM for the most important data
|
22
|
+
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
|
23
|
+
innodb_buffer_pool_size = 128M
|
24
|
+
|
25
|
+
log-error = <%= mysql.log_error %>
|
26
|
+
pid-file = <%= mysql.pid_file %>
|
27
|
+
|
28
|
+
# Remove leading # to turn on a very important data integrity option: logging
|
29
|
+
# changes to the binary log between backups.
|
30
|
+
log_bin = mysqld-bin
|
31
|
+
|
32
|
+
# These are commonly set, remove the # and set as required.
|
33
|
+
basedir = <%= mysql.home %>
|
34
|
+
datadir = <%= mysql.data_dir %>
|
35
|
+
port = <%= mysql.port %>
|
36
|
+
# server_id = .....
|
37
|
+
socket = <%= mysql.socket %>
|
38
|
+
|
39
|
+
# Remove leading # to set options mainly useful for reporting servers.
|
40
|
+
# The server defaults are faster for transactions and fast SELECTs.
|
41
|
+
# Adjust sizes as needed, experiment to find the optimal values.
|
42
|
+
# join_buffer_size = 128M
|
43
|
+
# sort_buffer_size = 2M
|
44
|
+
# read_rnd_buffer_size = 2M
|
45
|
+
|
46
|
+
character-set-server = <%= mysql.charset %>
|
47
|
+
|
48
|
+
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
|
@@ -1,12 +1,12 @@
|
|
1
1
|
location / {
|
2
|
-
root
|
3
|
-
index
|
2
|
+
root <%= nginx.www_dir %>;
|
3
|
+
index index.php index.html index.htm;
|
4
4
|
}
|
5
5
|
|
6
6
|
location ~ \.php$ {
|
7
|
-
root
|
8
|
-
fastcgi_pass
|
9
|
-
fastcgi_index
|
10
|
-
fastcgi_param
|
11
|
-
include
|
7
|
+
root <%= nginx.www_dir %>;
|
8
|
+
fastcgi_pass fastcgi_server;
|
9
|
+
fastcgi_index index.php;
|
10
|
+
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
11
|
+
include conf/fastcgi_params;
|
12
12
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<%- www_paths.each do|loc, alias_path| -%>
|
1
|
+
<%- nginx.www_paths.each do|loc, alias_path| -%>
|
2
2
|
location <%= loc %> {
|
3
|
-
charset
|
3
|
+
charset utf-8;
|
4
4
|
|
5
|
-
autoindex
|
5
|
+
autoindex on;
|
6
6
|
autoindex_localtime on;
|
7
7
|
autoindex_exact_size off;
|
8
8
|
|
9
|
-
alias
|
9
|
+
alias <%= alias_path %>;
|
10
10
|
}
|
11
11
|
<%- end -%>
|