nginx_config_generator 1.5 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/config.yml.example +2 -1
- data/lib/nginx.erb +10 -0
- data/nginx_config_generator.gemspec +4 -4
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/config.yml.example
CHANGED
@@ -9,10 +9,11 @@ root:
|
|
9
9
|
sites:
|
10
10
|
# We're naming this vhost 'errtheblog'
|
11
11
|
errtheblog:
|
12
|
-
# Two upstream servers to proxy balance.
|
12
|
+
# Two upstream servers to proxy balance fairly.
|
13
13
|
upstream:
|
14
14
|
- 127.0.0.1:8000
|
15
15
|
- 127.0.0.1:8001
|
16
|
+
fair: true
|
16
17
|
# Just a string of server names.
|
17
18
|
server_name: errtheblog.com www.errtheblog.com
|
18
19
|
# www.errtheblog.com => errtheblog.com
|
data/lib/nginx.erb
CHANGED
@@ -56,6 +56,9 @@ http {
|
|
56
56
|
<% Array(config['sites']).each do |name, site| %>
|
57
57
|
<% next unless site['upstream'] %>
|
58
58
|
upstream <%= name %> {
|
59
|
+
<% if site['fair'] %>
|
60
|
+
fair;
|
61
|
+
<% end %>
|
59
62
|
<% Array(site['upstream'] || site['upstreams']).each do |server| %>
|
60
63
|
server <%= server %>;
|
61
64
|
<% end %>
|
@@ -178,6 +181,13 @@ http {
|
|
178
181
|
location = /50x.html {
|
179
182
|
root html;
|
180
183
|
}
|
184
|
+
|
185
|
+
<% Array(site['location'] || site['locations']).each do |path, setting| %>
|
186
|
+
location = <%= path %> {
|
187
|
+
<%= setting %>
|
188
|
+
}
|
189
|
+
<% end %>
|
190
|
+
|
181
191
|
}
|
182
192
|
<% end %>
|
183
193
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Nginx_config_generator-1.
|
2
|
+
# Gem::Specification for Nginx_config_generator-1.6
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = %q{nginx_config_generator}
|
7
|
-
s.version = "1.
|
8
|
-
s.date = %q{2007-
|
7
|
+
s.version = "1.6"
|
8
|
+
s.date = %q{2007-11-19}
|
9
9
|
s.summary = %q{}
|
10
10
|
s.email = %q{chris@ozmm.org}
|
11
11
|
s.homepage = %q{http://require.errtheblog.com/projects}
|
@@ -24,7 +24,7 @@ end
|
|
24
24
|
# require 'rubygems'
|
25
25
|
# require 'echoe'
|
26
26
|
#
|
27
|
-
# Echoe.new('nginx_config_generator', '1.
|
27
|
+
# Echoe.new('nginx_config_generator', '1.6') do |p|
|
28
28
|
# p.rubyforge_name = 'err'
|
29
29
|
# p.author = 'Chris Wanstrath'
|
30
30
|
# p.email = 'chris@ozmm.org'
|
metadata
CHANGED