ykutils 0.1.4 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -1
- data/.rubocop.yml +2 -1
- data/.rubocop_todo.yml +181 -85
- data/Gemfile +11 -11
- data/Gemfile.lock +17 -12
- data/bin/erubix +1 -1
- data/bin/makegrid +4 -4
- data/lib/ykutils/debugutils.rb +44 -32
- data/lib/ykutils/erubyx.rb +30 -19
- data/lib/ykutils/fileoputils.rb +2 -2
- data/lib/ykutils/gridlist.rb +49 -49
- data/lib/ykutils/lines.rb +143 -143
- data/lib/ykutils/lsutils.rb +71 -71
- data/lib/ykutils/nginxconfig.rb +40 -41
- data/lib/ykutils/nginxconfigfiles.rb +31 -31
- data/lib/ykutils/nkfutil.rb +148 -147
- data/lib/ykutils/nkfutil19.rb +9 -11
- data/lib/ykutils/osutil.rb +16 -16
- data/lib/ykutils/retcodex.rb +1 -3
- data/lib/ykutils/stext.rb +427 -425
- data/lib/ykutils/stextx.rb +32 -32
- data/lib/ykutils/stringutils.rb +111 -111
- data/lib/ykutils/treemanager.rb +33 -33
- data/lib/ykutils/treemanagera.rb +21 -21
- data/lib/ykutils/version.rb +1 -1
- data/lib/ykutils/xlines.rb +8 -8
- data/lib/ykutils/yamlop.rb +227 -227
- data/lib/ykutils/yamlxop.rb +35 -35
- data/test_data/4servers.erb +7 -7
- data/test_data/a.bat +5 -5
- data/test_data/a_ncn.bat +12 -12
- data/test_data/v103-3-189-127/a.northern-cross.net/base.yml +28 -28
- data/test_data/v103-3-189-127/a.northern-cross.net/value_host.yml +1 -1
- data/test_data/v103-3-189-127/b.northern-cross.net/base.yml +28 -28
- data/test_data/v103-3-189-127/b.northern-cross.net/value_host.yml +1 -1
- data/test_data/v103-3-189-127/c.northern-cross.net/base.yml +28 -28
- data/test_data/v103-3-189-127/c.northern-cross.net/value_host.yml +1 -1
- data/test_data/v103-3-189-127/d.northern-cross.info/base.yml +28 -28
- data/test_data/v103-3-189-127/d.northern-cross.info/value_host.yml +1 -1
- data/test_data/v103-3-189-127/d.northern-cross.net/base.yml +28 -28
- data/test_data/v103-3-189-127/d.northern-cross.net/value_host.yml +1 -1
- data/test_data/v103-3-189-127/e.northern-cross.info/base.yml +28 -28
- data/test_data/v103-3-189-127/e.northern-cross.info/value_host.yml +1 -1
- data/test_data/v103-3-189-127/e.northern-cross.net/base.yml +28 -28
- data/test_data/v103-3-189-127/e.northern-cross.net/value_host.yml +1 -1
- data/test_data/v103-3-189-127/f.northern-cross.info/base.yml +28 -28
- data/test_data/v103-3-189-127/f.northern-cross.info/value_host.yml +1 -1
- data/test_data/v103-3-189-127/f.northern-cross.net/base.yml +28 -28
- data/test_data/v103-3-189-127/f.northern-cross.net/value_host.yml +1 -1
- data/test_data/v103-3-189-127/t_server_1.erb +7 -7
- data/test_data/v103-3-189-127/template.erb +21 -21
- data/test_data/v103-3-189-127/template_ssl.erb +22 -22
- data/test_data/v103-3-189-127/template_ssl_www.erb +12 -12
- data/test_data/v103-3-189-127/template_www.erb +24 -24
- data/test_data/v103-3-189-127/value.yml +3 -3
- data/test_data/v103-3-189-127/value_ssl.yml +5 -5
- data/ykutils.gemspec +45 -43
- metadata +8 -9
- data/_config.yml +0 -1
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: b.northern-cross.net
|
1
|
+
host: b.northern-cross.net
|
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: c.northern-cross.net
|
1
|
+
host: c.northern-cross.net
|
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: d.northern-cross.info
|
1
|
+
host: d.northern-cross.info
|
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: d.northern-cross.net
|
1
|
+
host: d.northern-cross.net
|
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: e.northern-cross.info
|
1
|
+
host: e.northern-cross.info
|
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: e.northern-cross.net
|
1
|
+
host: e.northern-cross.net
|
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: f.northern-cross.info
|
1
|
+
host: f.northern-cross.info
|
@@ -1,28 +1,28 @@
|
|
1
|
-
_root:
|
2
|
-
template: 4servers.erb
|
3
|
-
server1:
|
4
|
-
protocol: ssl
|
5
|
-
template: template_ssl.erb
|
6
|
-
value:
|
7
|
-
- value_host.yml
|
8
|
-
- ../value_ssl.yml
|
9
|
-
server2:
|
10
|
-
protocol: ssl
|
11
|
-
domain: www
|
12
|
-
template: template_ssl_www.erb
|
13
|
-
value:
|
14
|
-
- value_host.yml
|
15
|
-
- ../value_ssl.yml
|
16
|
-
server3:
|
17
|
-
protocol:
|
18
|
-
template: template.erb
|
19
|
-
value:
|
20
|
-
- value_host.yml
|
21
|
-
- ../value.yml
|
22
|
-
server4:
|
23
|
-
protocol:
|
24
|
-
domain: www
|
25
|
-
template: template_www.erb
|
26
|
-
value:
|
27
|
-
- value_host.yml
|
28
|
-
- ../value.yml
|
1
|
+
_root:
|
2
|
+
template: 4servers.erb
|
3
|
+
server1:
|
4
|
+
protocol: ssl
|
5
|
+
template: template_ssl.erb
|
6
|
+
value:
|
7
|
+
- value_host.yml
|
8
|
+
- ../value_ssl.yml
|
9
|
+
server2:
|
10
|
+
protocol: ssl
|
11
|
+
domain: www
|
12
|
+
template: template_ssl_www.erb
|
13
|
+
value:
|
14
|
+
- value_host.yml
|
15
|
+
- ../value_ssl.yml
|
16
|
+
server3:
|
17
|
+
protocol:
|
18
|
+
template: template.erb
|
19
|
+
value:
|
20
|
+
- value_host.yml
|
21
|
+
- ../value.yml
|
22
|
+
server4:
|
23
|
+
protocol:
|
24
|
+
domain: www
|
25
|
+
template: template_www.erb
|
26
|
+
value:
|
27
|
+
- value_host.yml
|
28
|
+
- ../value.yml
|
@@ -1 +1 @@
|
|
1
|
-
host: f.northern-cross.net
|
1
|
+
host: f.northern-cross.net
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<%= server_ssl %>
|
2
|
-
|
3
|
-
<%= server_ssl_www %>
|
4
|
-
|
5
|
-
<%= server %>
|
6
|
-
|
7
|
-
<%= server_www %>
|
1
|
+
<%= server_ssl %>
|
2
|
+
|
3
|
+
<%= server_ssl_www %>
|
4
|
+
|
5
|
+
<%= server %>
|
6
|
+
|
7
|
+
<%= server_www %>
|
@@ -1,21 +1,21 @@
|
|
1
|
-
server {
|
2
|
-
if ($host = <%= host %>) {
|
3
|
-
return 301 https://$host$request_uri;
|
4
|
-
}
|
5
|
-
|
6
|
-
listen 80;
|
7
|
-
server_name <%= host %>;
|
8
|
-
|
9
|
-
error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
|
10
|
-
access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
|
11
|
-
|
12
|
-
root /var/www/vhosts/<%= host %>/httpdocs;
|
13
|
-
location / {
|
14
|
-
index index.html;
|
15
|
-
}
|
16
|
-
error_page 500 502 503 504 /50x.html;
|
17
|
-
location = /50x.html {
|
18
|
-
root /usr/share/nginx/html/;
|
19
|
-
index 50x.html;
|
20
|
-
}
|
21
|
-
}
|
1
|
+
server {
|
2
|
+
if ($host = <%= host %>) {
|
3
|
+
return 301 https://$host$request_uri;
|
4
|
+
}
|
5
|
+
|
6
|
+
listen 80;
|
7
|
+
server_name <%= host %>;
|
8
|
+
|
9
|
+
error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
|
10
|
+
access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
|
11
|
+
|
12
|
+
root /var/www/vhosts/<%= host %>/httpdocs;
|
13
|
+
location / {
|
14
|
+
index index.html;
|
15
|
+
}
|
16
|
+
error_page 500 502 503 504 /50x.html;
|
17
|
+
location = /50x.html {
|
18
|
+
root /usr/share/nginx/html/;
|
19
|
+
index 50x.html;
|
20
|
+
}
|
21
|
+
}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
server {
|
2
|
-
listen <%= ssl_port %>;
|
3
|
-
ssl_certificate <%= ssl_certificate %>;
|
4
|
-
ssl_certificate_key <%= ssl_certificate_key %>;
|
5
|
-
server_name <%= host %>;
|
6
|
-
|
7
|
-
error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
|
8
|
-
access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
|
9
|
-
|
10
|
-
# rewrite_log on;
|
11
|
-
|
12
|
-
root /var/www/vhosts/<%= host %>/httpdocs;
|
13
|
-
location / {
|
14
|
-
index index.html;
|
15
|
-
}
|
16
|
-
error_page 500 502 503 504 /50x.html;
|
17
|
-
#error_page 500 /50x.html;
|
18
|
-
location = /50x.html {
|
19
|
-
root /usr/share/nginx/html/;
|
20
|
-
index 50x.html;
|
21
|
-
}
|
22
|
-
}
|
1
|
+
server {
|
2
|
+
listen <%= ssl_port %>;
|
3
|
+
ssl_certificate <%= ssl_certificate %>;
|
4
|
+
ssl_certificate_key <%= ssl_certificate_key %>;
|
5
|
+
server_name <%= host %>;
|
6
|
+
|
7
|
+
error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
|
8
|
+
access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
|
9
|
+
|
10
|
+
# rewrite_log on;
|
11
|
+
|
12
|
+
root /var/www/vhosts/<%= host %>/httpdocs;
|
13
|
+
location / {
|
14
|
+
index index.html;
|
15
|
+
}
|
16
|
+
error_page 500 502 503 504 /50x.html;
|
17
|
+
#error_page 500 /50x.html;
|
18
|
+
location = /50x.html {
|
19
|
+
root /usr/share/nginx/html/;
|
20
|
+
index 50x.html;
|
21
|
+
}
|
22
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
server {
|
2
|
-
listen <%= ssl_port %>;
|
3
|
-
server_name www.<%= host %>;
|
4
|
-
#
|
5
|
-
return 301 https://<%= host %>;
|
6
|
-
|
7
|
-
ssl_certificate <%= ssl_certificate %>;
|
8
|
-
ssl_certificate_key <%= ssl_certificate_key %>;
|
9
|
-
include /etc/letsencrypt/options-ssl-nginx.conf;
|
10
|
-
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
11
|
-
|
12
|
-
}
|
1
|
+
server {
|
2
|
+
listen <%= ssl_port %>;
|
3
|
+
server_name www.<%= host %>;
|
4
|
+
#
|
5
|
+
return 301 https://<%= host %>;
|
6
|
+
|
7
|
+
ssl_certificate <%= ssl_certificate %>;
|
8
|
+
ssl_certificate_key <%= ssl_certificate_key %>;
|
9
|
+
include /etc/letsencrypt/options-ssl-nginx.conf;
|
10
|
+
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
11
|
+
|
12
|
+
}
|
@@ -1,24 +1,24 @@
|
|
1
|
-
server {
|
2
|
-
if ($host = northern-cross.net) {
|
3
|
-
return 301 https://$host$request_uri;
|
4
|
-
}
|
5
|
-
|
6
|
-
|
7
|
-
listen <%= port %>;
|
8
|
-
server_name <%= host %>;
|
9
|
-
|
10
|
-
error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
|
11
|
-
access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
|
12
|
-
|
13
|
-
rewrite_log on;
|
14
|
-
|
15
|
-
root /var/www/vhosts/<%= host %>/httpdocs;
|
16
|
-
location / {
|
17
|
-
index index.html;
|
18
|
-
}
|
19
|
-
error_page 500 502 503 504 /50x.html;
|
20
|
-
location = /50x.html {
|
21
|
-
root /usr/share/nginx/html/;
|
22
|
-
index 50x.html;
|
23
|
-
}
|
24
|
-
}
|
1
|
+
server {
|
2
|
+
if ($host = northern-cross.net) {
|
3
|
+
return 301 https://$host$request_uri;
|
4
|
+
}
|
5
|
+
|
6
|
+
|
7
|
+
listen <%= port %>;
|
8
|
+
server_name <%= host %>;
|
9
|
+
|
10
|
+
error_log /var/www/vhosts/<%= host %>/statistics/logs/<%= error_log %>;
|
11
|
+
access_log /var/www/vhosts/<%= host %>/statistics/logs/<%= access_log %>;
|
12
|
+
|
13
|
+
rewrite_log on;
|
14
|
+
|
15
|
+
root /var/www/vhosts/<%= host %>/httpdocs;
|
16
|
+
location / {
|
17
|
+
index index.html;
|
18
|
+
}
|
19
|
+
error_page 500 502 503 504 /50x.html;
|
20
|
+
location = /50x.html {
|
21
|
+
root /usr/share/nginx/html/;
|
22
|
+
index 50x.html;
|
23
|
+
}
|
24
|
+
}
|