shared-infrastructure 0.0.17 → 0.0.18
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2388baa93ddfa0373ade38fdd49511f4ab4b48f3
|
4
|
+
data.tar.gz: 34351a7ee79549d6c740c3920c11809c4fe628a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 569dd911a7ce4aa8f1eb4619172c7674f9d5b862823ad7325845f37d06cd279ee53e93f324ab374ac977ad65fb7ed647142f4ac450a4c83aa5f1b2a4271843b8
|
7
|
+
data.tar.gz: 8e15c2b82da4e28f1557ae0dd614b4dc5db568b727fb33977c892880090e35ffa45244dc259c8157a1ea13ef1e0aa40d5eea3ab49f86ea09f4b6ddff24034491
|
@@ -9,18 +9,18 @@ module Nginx
|
|
9
9
|
|
10
10
|
attr_reader :domain, :location_directory
|
11
11
|
|
12
|
-
def alias_string
|
13
|
-
File.join(
|
12
|
+
def alias_string
|
13
|
+
File.join(domain.root, location_directory).to_s
|
14
14
|
end
|
15
15
|
|
16
16
|
def location
|
17
|
-
"
|
17
|
+
"/__x_accel"
|
18
18
|
end
|
19
19
|
|
20
20
|
def proxy_set_header(domain_name)
|
21
21
|
[
|
22
22
|
" proxy_set_header X-Sendfile-Type X-Accel-Redirect;",
|
23
|
-
" proxy_set_header X-Accel-Mapping #{alias_string
|
23
|
+
" proxy_set_header X-Accel-Mapping #{alias_string}/=#{location}/;"
|
24
24
|
].join("\n")
|
25
25
|
end
|
26
26
|
end
|
@@ -23,7 +23,7 @@ sudo nginx -s reload
|
|
23
23
|
|
24
24
|
Then run the following command:
|
25
25
|
|
26
|
-
sudo certbot certonly --webroot -w #{Nginx.root_directory(domain.domain_name)} #{
|
26
|
+
sudo certbot certonly --webroot -w #{Nginx.root_directory(domain.domain_name)} #{domain.certbot_domain_names}
|
27
27
|
|
28
28
|
You can test renewal with:
|
29
29
|
|
@@ -105,12 +105,15 @@ Finally, re-run this script to configure nginx for TLS.
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def save
|
108
|
-
|
108
|
+
domain_root = SharedInfrastructure::Output.file_name(domain.root)
|
109
|
+
FileUtils.mkdir_p(domain_root)
|
109
110
|
if Process.uid.zero?
|
110
111
|
FileUtils.chown(user,
|
111
112
|
"www-data",
|
112
|
-
|
113
|
+
domain_root)
|
113
114
|
end
|
115
|
+
# Set the directory gid bit, so files created inside inherit the group.
|
116
|
+
File.chmod(File.stat(domain_root).mode | 0o2000, domain_root)
|
114
117
|
super
|
115
118
|
end
|
116
119
|
|
@@ -41,7 +41,7 @@ module Runner
|
|
41
41
|
# FIXME: This is only applicable to Rails apps.
|
42
42
|
opts.on("-a LOCATION",
|
43
43
|
"--accel LOCATION",
|
44
|
-
"Location to serve when app responds with 'X-Accel'") do |accel_location|
|
44
|
+
"Location below application root to serve when app responds with 'X-Accel'") do |accel_location|
|
45
45
|
options[:accel_location] = accel_location
|
46
46
|
end
|
47
47
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shared-infrastructure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Larry Reid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'For static sites, Rails apps, and reverse proxies.
|
14
14
|
|