foreman-export-nginx 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/data/export/nginx/nginx.erb +6 -2
- data/foreman-export-nginx.gemspec +1 -1
- data/lib/foreman/export/nginx.rb +1 -0
- metadata +2 -3
data/README.md
CHANGED
@@ -28,6 +28,7 @@ There is one requied and several optional environment variables:
|
|
28
28
|
* `SSL_CERT_PATH` path to the certificate to use for ssl. Optional if you've set up a wildcard cert.
|
29
29
|
* `SSL_KEY_PATH` path to the certificate key. Required if you specified `SSL_CERT_PATH`.
|
30
30
|
* `FORCE_SSL` true to force redirect to SSL
|
31
|
+
* `FORCE_DOMAIN` redirect all requests to this domain
|
31
32
|
|
32
33
|
## Contributing
|
33
34
|
|
data/data/export/nginx/nginx.erb
CHANGED
@@ -22,10 +22,14 @@ server {
|
|
22
22
|
|
23
23
|
<% if force_ssl %>
|
24
24
|
if ($ssl_protocol = "") {
|
25
|
-
rewrite ^
|
25
|
+
rewrite ^https://$server_name$request_uri? permanent;
|
26
26
|
}
|
27
27
|
<% end %>
|
28
|
-
|
28
|
+
|
29
|
+
<% if force_domain %>
|
30
|
+
if ( $host != '<%= force_domain %>' ) {
|
31
|
+
rewrite ^http://<%= force_domain %>$request_uri? permanent;
|
32
|
+
}
|
29
33
|
<% end %>
|
30
34
|
|
31
35
|
root <%= engine.root %>/public;
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "foreman-export-nginx"
|
7
|
-
gem.version = '0.0.
|
7
|
+
gem.version = '0.0.21'
|
8
8
|
gem.authors = ["Pete Keen"]
|
9
9
|
gem.email = ["pete@bugsplat.info"]
|
10
10
|
gem.description = %q{Export Nginx configs using Foreman}
|
data/lib/foreman/export/nginx.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-export-nginx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: foreman
|
@@ -69,4 +69,3 @@ signing_key:
|
|
69
69
|
specification_version: 3
|
70
70
|
summary: Export Nginx confguration files using Foreman
|
71
71
|
test_files: []
|
72
|
-
has_rdoc:
|