nginx_config_generator_kthompson 0.2.1 → 0.2.2

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/nginx.erb +8 -5
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -18,7 +18,7 @@ events {
18
18
  http {
19
19
  # pull in mime-types. You can break out your config
20
20
  # into as many include's as you want to make it cleaner
21
- include <%= config['config_path'] || 'conf/' %>mime.types;
21
+ include <%= config['config_path'] || '' %>mime.types;
22
22
 
23
23
  <% if config['passenger_root'] && config['passenger_ruby'] %>
24
24
  passenger_root <%= config['passenger_root'] %>;
@@ -35,7 +35,7 @@ http {
35
35
  '"$http_user_agent" "http_x_forwarded_for"';
36
36
 
37
37
  # main access log
38
- access_log <%= config['log_path'] || 'logs/' %>access.log;
38
+ access_log <%= config['log_path'] || 'logs/' %>access.log main;
39
39
 
40
40
  # main error log
41
41
  error_log <%= config['log_path'] || 'logs/' %>error.log;
@@ -103,12 +103,12 @@ http {
103
103
 
104
104
  # doc root
105
105
  root <%= (config['root'][ site['root'] || 'default' ] || site['root']) % name %>;
106
- <% if site['passenger'] %>
106
+ <% if site['rails_env'] %>
107
107
  passenger_enabled on;
108
- rails_env <%= site['passenger']['environment'] || 'development' %>;
108
+ rails_env <%= site['rails_env'] %>;
109
109
  <% end %>
110
110
  # vhost specific access log
111
- access_log logs/<%= name %>.access.log main;
111
+ access_log logs/<%= name %>.access.log main;
112
112
 
113
113
  #Set the max size for file uploads to 50Mb
114
114
  client_max_body_size 50M;
@@ -136,6 +136,9 @@ http {
136
136
  <% end %>
137
137
 
138
138
  location / {
139
+ <% if site['rails_env'] %>
140
+ passenger_enabled on;
141
+ <% end %>
139
142
  <% Array(site['rewrite'] || site['rewrites']).each do |rewrite| %>
140
143
  rewrite <%= rewrite %> break;
141
144
  <% end %>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nginx_config_generator_kthompson
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Thompson