capistrano-exts 1.12.0 → 1.12.1

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.
data/README.md CHANGED
@@ -18,7 +18,7 @@ gem install capistrano-exts
18
18
  or add it to your Gemfile
19
19
 
20
20
  ```ruby
21
- gem 'capistrano-exts', '>=1.12.0', :require => false
21
+ gem 'capistrano-exts', '>=1.12.1', :require => false
22
22
  ```
23
23
 
24
24
  # Setup
@@ -233,6 +233,43 @@ set :php_fpm_port, '9000'
233
233
  # => What is the path to the socket file
234
234
  # set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
235
235
 
236
+ #
237
+ #
238
+ #############
239
+
240
+ #############
241
+ # Unicorn
242
+ #
243
+
244
+ # What's the unicorn binary?
245
+ # Default: unicorn_rails
246
+ # set :unicorn_binary, 'unicorn_rails'
247
+
248
+ # Where's unicorn pid ?
249
+ # Should be in the shared path or some other folder but not in the current_path!
250
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
251
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
252
+
253
+ # Where's unicorn config ?
254
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
255
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
256
+
257
+ #
258
+ #
259
+ #############
260
+
261
+ #############
262
+ # God
263
+ #
264
+
265
+ # Where's the god binary ?
266
+ # Default: god
267
+ # set :god_binary, 'god'
268
+
269
+ # where's god config ?
270
+ # Default: "#{fetch :current_path}/config/god.rb"
271
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
272
+
236
273
  #
237
274
  #
238
275
  #############
@@ -232,6 +232,43 @@ set :php_fpm_port, '9000'
232
232
  # => What is the path to the socket file
233
233
  # set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
234
234
 
235
+ #
236
+ #
237
+ #############
238
+
239
+ #############
240
+ # Unicorn
241
+ #
242
+
243
+ # What's the unicorn binary?
244
+ # Default: unicorn_rails
245
+ # set :unicorn_binary, 'unicorn_rails'
246
+
247
+ # Where's unicorn pid ?
248
+ # Should be in the shared path or some other folder but not in the current_path!
249
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
250
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
251
+
252
+ # Where's unicorn config ?
253
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
254
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
255
+
256
+ #
257
+ #
258
+ #############
259
+
260
+ #############
261
+ # God
262
+ #
263
+
264
+ # Where's the god binary ?
265
+ # Default: god
266
+ # set :god_binary, 'god'
267
+
268
+ # where's god config ?
269
+ # Default: "#{fetch :current_path}/config/god.rb"
270
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
271
+
235
272
  #
236
273
  #
237
274
  #############
@@ -232,6 +232,43 @@ set :php_fpm_port, '9000'
232
232
  # => What is the path to the socket file
233
233
  # set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
234
234
 
235
+ #
236
+ #
237
+ #############
238
+
239
+ #############
240
+ # Unicorn
241
+ #
242
+
243
+ # What's the unicorn binary?
244
+ # Default: unicorn_rails
245
+ # set :unicorn_binary, 'unicorn_rails'
246
+
247
+ # Where's unicorn pid ?
248
+ # Should be in the shared path or some other folder but not in the current_path!
249
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
250
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
251
+
252
+ # Where's unicorn config ?
253
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
254
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
255
+
256
+ #
257
+ #
258
+ #############
259
+
260
+ #############
261
+ # God
262
+ #
263
+
264
+ # Where's the god binary ?
265
+ # Default: god
266
+ # set :god_binary, 'god'
267
+
268
+ # where's god config ?
269
+ # Default: "#{fetch :current_path}/config/god.rb"
270
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
271
+
235
272
  #
236
273
  #
237
274
  #############
@@ -233,6 +233,43 @@ set :web_server_mode, :passenger
233
233
  # => What is the path to the socket file
234
234
  # set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
235
235
 
236
+ #
237
+ #
238
+ #############
239
+
240
+ #############
241
+ # Unicorn
242
+ #
243
+
244
+ # What's the unicorn binary?
245
+ # Default: unicorn_rails
246
+ # set :unicorn_binary, 'unicorn_rails'
247
+
248
+ # Where's unicorn pid ?
249
+ # Should be in the shared path or some other folder but not in the current_path!
250
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
251
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
252
+
253
+ # Where's unicorn config ?
254
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
255
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
256
+
257
+ #
258
+ #
259
+ #############
260
+
261
+ #############
262
+ # God
263
+ #
264
+
265
+ # Where's the god binary ?
266
+ # Default: god
267
+ # set :god_binary, 'god'
268
+
269
+ # where's god config ?
270
+ # Default: "#{fetch :current_path}/config/god.rb"
271
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
272
+
236
273
  #
237
274
  #
238
275
  #############
@@ -233,6 +233,43 @@ set :web_server_mode, :passenger
233
233
  # => What is the path to the socket file
234
234
  # set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
235
235
 
236
+ #
237
+ #
238
+ #############
239
+
240
+ #############
241
+ # Unicorn
242
+ #
243
+
244
+ # What's the unicorn binary?
245
+ # Default: unicorn_rails
246
+ # set :unicorn_binary, 'unicorn_rails'
247
+
248
+ # Where's unicorn pid ?
249
+ # Should be in the shared path or some other folder but not in the current_path!
250
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
251
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
252
+
253
+ # Where's unicorn config ?
254
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
255
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
256
+
257
+ #
258
+ #
259
+ #############
260
+
261
+ #############
262
+ # God
263
+ #
264
+
265
+ # Where's the god binary ?
266
+ # Default: god
267
+ # set :god_binary, 'god'
268
+
269
+ # where's god config ?
270
+ # Default: "#{fetch :current_path}/config/god.rb"
271
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
272
+
236
273
  #
237
274
  #
238
275
  #############
@@ -233,6 +233,43 @@ set :web_server_mode, :passenger
233
233
  # => What is the path to the socket file
234
234
  # set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
235
235
 
236
+ #
237
+ #
238
+ #############
239
+
240
+ #############
241
+ # Unicorn
242
+ #
243
+
244
+ # What's the unicorn binary?
245
+ # Default: unicorn_rails
246
+ # set :unicorn_binary, 'unicorn_rails'
247
+
248
+ # Where's unicorn pid ?
249
+ # Should be in the shared path or some other folder but not in the current_path!
250
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
251
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
252
+
253
+ # Where's unicorn config ?
254
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
255
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
256
+
257
+ #
258
+ #
259
+ #############
260
+
261
+ #############
262
+ # God
263
+ #
264
+
265
+ # Where's the god binary ?
266
+ # Default: god
267
+ # set :god_binary, 'god'
268
+
269
+ # where's god config ?
270
+ # Default: "#{fetch :current_path}/config/god.rb"
271
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
272
+
236
273
  #
237
274
  #
238
275
  #############
@@ -233,6 +233,43 @@ set :web_server_mode, :reverse_proxy
233
233
  # => What is the path to the socket file
234
234
  set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
235
235
 
236
+ #
237
+ #
238
+ #############
239
+
240
+ #############
241
+ # Unicorn
242
+ #
243
+
244
+ # What's the unicorn binary?
245
+ # Default: unicorn_rails
246
+ # set :unicorn_binary, 'unicorn_rails'
247
+
248
+ # Where's unicorn pid ?
249
+ # Should be in the shared path or some other folder but not in the current_path!
250
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
251
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
252
+
253
+ # Where's unicorn config ?
254
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
255
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
256
+
257
+ #
258
+ #
259
+ #############
260
+
261
+ #############
262
+ # God
263
+ #
264
+
265
+ # Where's the god binary ?
266
+ # Default: god
267
+ # set :god_binary, 'god'
268
+
269
+ # where's god config ?
270
+ # Default: "#{fetch :current_path}/config/god.rb"
271
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
272
+
236
273
  #
237
274
  #
238
275
  #############
@@ -246,6 +246,43 @@ set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
246
246
  # contao's admin section
247
247
  # set :contents_path, -> { "#{fetch :public_path}/tl_files/contents"}
248
248
 
249
+ #
250
+ #
251
+ #############
252
+
253
+ #############
254
+ # Unicorn
255
+ #
256
+
257
+ # What's the unicorn binary?
258
+ # Default: unicorn_rails
259
+ # set :unicorn_binary, 'unicorn_rails'
260
+
261
+ # Where's unicorn pid ?
262
+ # Should be in the shared path or some other folder but not in the current_path!
263
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
264
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
265
+
266
+ # Where's unicorn config ?
267
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
268
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
269
+
270
+ #
271
+ #
272
+ #############
273
+
274
+ #############
275
+ # God
276
+ #
277
+
278
+ # Where's the god binary ?
279
+ # Default: god
280
+ # set :god_binary, 'god'
281
+
282
+ # where's god config ?
283
+ # Default: "#{fetch :current_path}/config/god.rb"
284
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
285
+
249
286
  #
250
287
  #
251
288
  #############
@@ -246,6 +246,43 @@ set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
246
246
  # contao's admin section
247
247
  # set :contents_path, -> { "#{fetch :public_path}/tl_files/contents"}
248
248
 
249
+ #
250
+ #
251
+ #############
252
+
253
+ #############
254
+ # Unicorn
255
+ #
256
+
257
+ # What's the unicorn binary?
258
+ # Default: unicorn_rails
259
+ # set :unicorn_binary, 'unicorn_rails'
260
+
261
+ # Where's unicorn pid ?
262
+ # Should be in the shared path or some other folder but not in the current_path!
263
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
264
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
265
+
266
+ # Where's unicorn config ?
267
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
268
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
269
+
270
+ #
271
+ #
272
+ #############
273
+
274
+ #############
275
+ # God
276
+ #
277
+
278
+ # Where's the god binary ?
279
+ # Default: god
280
+ # set :god_binary, 'god'
281
+
282
+ # where's god config ?
283
+ # Default: "#{fetch :current_path}/config/god.rb"
284
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
285
+
249
286
  #
250
287
  #
251
288
  #############
@@ -9,4 +9,14 @@ class String
9
9
  gsub!(/[\n]{3,}/, "\n\n")
10
10
  self
11
11
  end
12
+
13
+ def strip_trailing_whitespace
14
+ dup.strip_trailing_whitespace!
15
+ end
16
+
17
+ def strip_trailing_whitespace!
18
+ strip!
19
+ gsub!(/[ \t]+$/, '')
20
+ self
21
+ end
12
22
  end
@@ -7,7 +7,10 @@ Capistrano::Configuration.instance(:must_exist).load do
7
7
  namespace :god do
8
8
  desc "start god, this starts up unicorn server"
9
9
  task :start, :roles => :web, :except => {:no_release => true} do
10
- run "cd #{current_path} && #{god_binary} -c #{god_config} --log /var/log/god.log --no-syslog --log-level warn"
10
+ logs_path = fetch(:logs_path)
11
+ god_config = fetch(:god_config, "#{fetch :current_path}/config/unicorn.rb")
12
+ god_binary = fetch(:god_binary, 'god')
13
+ run "cd #{current_path} && #{god_binary} -c #{god_config} --log #{logs_path}/god.log --no-syslog --log-level warn"
11
14
  end
12
15
 
13
16
  desc "stop god, this shutdowns unicorn server"
@@ -25,4 +28,7 @@ Capistrano::Configuration.instance(:must_exist).load do
25
28
  'true' == capture("if #{god_binary} status; then echo 'true'; fi").strip
26
29
  end
27
30
  end
31
+
32
+ # Dependencies
33
+ after "deploy:folders", "god:setup"
28
34
  end
@@ -5,30 +5,47 @@ end
5
5
 
6
6
  Capistrano::Configuration.instance(:must_exist).load do
7
7
  namespace :unicorn do
8
+ desc "[internal] Setup unicorn"
9
+ task :setup, :roles => :web, :except => {:no_release => true} do
10
+ unicorn_pid = fetch(:unicorn_pid, "#{fetch :shared_path}/pids/unicorn.pid")
11
+
12
+ # Create the pids folder
13
+ run <<-CMD
14
+ #{try_sudo} mkdir -p #{File.dirname(fetch(:unicorn_pid))}
15
+ CMD
16
+ end
17
+
8
18
  desc "start unicorn"
9
- task :start, :roles => :app, :except => {:no_release => true} do
10
- run "cd #{current_path} && #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
19
+ task :start, :roles => :web, :except => {:no_release => true} do
20
+ unicorn_binary = fetch(:unicorn_binary, 'unicorn_rails')
21
+ unicorn_config = fetch(:unicorn_config, "#{fetch :current_path}/config/unicorn.rb")
22
+ rails_env = fetch(:rails_env, 'production')
23
+ run "cd #{fetch :current_path} && #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
11
24
  end
12
25
 
13
26
  desc "stop unicorn"
14
- task :stop, :roles => :app, :except => {:no_release => true} do
27
+ task :stop, :roles => :web, :except => {:no_release => true} do
28
+ unicorn_pid = fetch(:unicorn_pid, )
15
29
  run "#{try_sudo} kill `cat #{unicorn_pid}`"
16
30
  end
17
31
 
18
32
  desc "unicorn reload"
19
- task :reload, :roles => :app, :except => {:no_release => true} do
33
+ task :reload, :roles => :web, :except => {:no_release => true} do
20
34
  run "#{try_sudo} kill -s USR2 `cat #{unicorn_pid}`"
21
35
  end
22
36
 
23
37
  desc "graceful stop unicorn"
24
- task :graceful_stop, :roles => :app, :except => {:no_release => true} do
38
+ task :graceful_stop, :roles => :web, :except => {:no_release => true} do
25
39
  run "#{try_sudo} kill -s QUIT `cat #{unicorn_pid}`"
26
40
  end
27
41
 
28
42
  desc "restart unicorn"
29
- task :restart, :roles => :app, :except => {:no_release => true} do
43
+ task :restart, :roles => :web, :except => {:no_release => true} do
30
44
  stop
31
45
  start
32
46
  end
33
47
  end
48
+
49
+ # Dependencies
50
+ after "deploy:folders", "unicorn:setup"
34
51
  end
@@ -9,7 +9,7 @@ module Capistrano
9
9
  sanity_check
10
10
 
11
11
  erb_template = ::ERB.new(File.read(@template))
12
- erb_template.result(binding).strip_empty_lines
12
+ erb_template.result(binding).strip_trailing_whitespace.strip_empty_lines
13
13
  end
14
14
  end
15
15
  end
@@ -231,6 +231,43 @@ set :web_server_mode, :reverse_proxy
231
231
  # => What is the path to the socket file
232
232
  # set :reverse_proxy_socket, -> { "#{shared_path}/sockets/unicorn.sock"}
233
233
 
234
+ #
235
+ #
236
+ #############
237
+
238
+ #############
239
+ # Unicorn
240
+ #
241
+
242
+ # What's the unicorn binary?
243
+ # Default: unicorn_rails
244
+ # set :unicorn_binary, 'unicorn_rails'
245
+
246
+ # Where's unicorn pid ?
247
+ # Should be in the shared path or some other folder but not in the current_path!
248
+ # Default: #{fetch :shared_path}/pids/unicorn.pid
249
+ # set :unicorn_pid, -> { "#{fetch :shared_path}/pids/unicorn.pid" }
250
+
251
+ # Where's unicorn config ?
252
+ # Default: "#{fetch :current_path}/config/unicorn.rb"
253
+ # set :unicorn_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
254
+
255
+ #
256
+ #
257
+ #############
258
+
259
+ #############
260
+ # God
261
+ #
262
+
263
+ # Where's the god binary ?
264
+ # Default: god
265
+ # set :god_binary, 'god'
266
+
267
+ # where's god config ?
268
+ # Default: "#{fetch :current_path}/config/god.rb"
269
+ # set :god_config, -> { "#{fetch :current_path}/config/unicorn.rb" }
270
+
234
271
  #
235
272
  #
236
273
  #############
@@ -27,7 +27,6 @@ server {
27
27
  # This allows people to use stylesheet, javascript and images in their
28
28
  # maintenance html file
29
29
  if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
30
- expires 30d;
31
30
  break;
32
31
  }
33
32
 
@@ -54,23 +53,19 @@ server {
54
53
  error_page 500 502 504 /500.html;
55
54
 
56
55
  <% if passenger? %>
56
+ # Enable passenger
57
57
  passenger_enabled on;
58
+ <% end %>
58
59
 
59
- <% if mod_rewrite? %>
60
- # this serves static files that exist without running other rewrite tests
61
- if (-f $request_filename) {
62
- break;
63
- }
64
- <% end %>
65
- <% else %>
60
+ # Root Location
66
61
  location / {
67
- <% if mod_rewrite? %>
68
62
  # this serves static files that exist without running other rewrite tests
69
63
  if (-f $request_filename) {
70
64
  expires 30d;
71
65
  break;
72
66
  }
73
67
 
68
+ <% if php_fpm? && mod_rewrite? %>
74
69
  # this sends all non-existing file or directory requests to index.php
75
70
  if (!-e $request_filename) {
76
71
  rewrite ^(.+)$ /index.php?q=$1 last;
@@ -80,6 +75,24 @@ server {
80
75
  <% if reverse_proxy? %>
81
76
  proxy_pass http://<%= @application %>_reverse_proxy;
82
77
  proxy_set_header Host $host;
78
+
79
+ proxy_redirect off;
80
+
81
+ proxy_set_header Host $host;
82
+ proxy_set_header X-Real-IP $remote_addr;
83
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
84
+
85
+ client_max_body_size 10m;
86
+ client_body_buffer_size 128k;
87
+
88
+ proxy_connect_timeout 90;
89
+ proxy_send_timeout 90;
90
+ proxy_read_timeout 90;
91
+
92
+ proxy_buffer_size 4k;
93
+ proxy_buffers 4 32k;
94
+ proxy_busy_buffers_size 64k;
95
+ proxy_temp_file_write_size 64k;
83
96
  <% end %>
84
97
  }
85
98
 
@@ -88,7 +101,6 @@ server {
88
101
  deny all;
89
102
  }
90
103
  <% end if @denied_access.present? %>
91
- <% end %>
92
104
 
93
105
  <% if php_fpm? %>
94
106
  location ~ .php$ {
@@ -3,7 +3,7 @@ module Capistrano
3
3
  module Version #:nodoc:
4
4
  MAJOR = 1
5
5
  MINOR = 12
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  ARRAY = [MAJOR, MINOR, TINY]
9
9
  STRING = ARRAY.join(".")
@@ -10,7 +10,6 @@ server {
10
10
  # This allows people to use stylesheet, javascript and images in their
11
11
  # maintenance html file
12
12
  if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
13
- expires 30d;
14
13
  break;
15
14
  }
16
15
 
@@ -36,13 +35,17 @@ server {
36
35
  error_page 404 /404.html;
37
36
  error_page 500 502 504 /500.html;
38
37
 
38
+ # Enable passenger
39
39
  passenger_enabled on;
40
40
 
41
-
42
- # this serves static files that exist without running other rewrite tests
43
- if (-f $request_filename) {
44
- break;
41
+ # Root Location
42
+ location / {
43
+ # this serves static files that exist without running other rewrite tests
44
+ if (-f $request_filename) {
45
+ expires 30d;
46
+ break;
47
+ }
48
+
45
49
  }
46
-
47
50
 
48
51
  }
@@ -12,7 +12,6 @@ server {
12
12
  # This allows people to use stylesheet, javascript and images in their
13
13
  # maintenance html file
14
14
  if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
15
- expires 30d;
16
15
  break;
17
16
  }
18
17
 
@@ -38,8 +37,8 @@ server {
38
37
  error_page 404 /404.html;
39
38
  error_page 500 502 504 /500.html;
40
39
 
40
+ # Root Location
41
41
  location / {
42
-
43
42
  # this serves static files that exist without running other rewrite tests
44
43
  if (-f $request_filename) {
45
44
  expires 30d;
@@ -50,13 +49,9 @@ server {
50
49
  if (!-e $request_filename) {
51
50
  rewrite ^(.+)$ /index.php?q=$1 last;
52
51
  }
53
-
54
52
 
55
-
56
53
  }
57
54
 
58
-
59
-
60
55
  location ~ .php$ {
61
56
  fastcgi_pass localhost:30313;
62
57
  fastcgi_index index.php;
@@ -82,7 +77,6 @@ server {
82
77
  fastcgi_param SERVER_PORT $server_port;
83
78
  fastcgi_param SERVER_NAME $server_name;
84
79
 
85
-
86
80
  }
87
81
 
88
82
  }
@@ -8,7 +8,6 @@ server {
8
8
  # This allows people to use stylesheet, javascript and images in their
9
9
  # maintenance html file
10
10
  if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
11
- expires 30d;
12
11
  break;
13
12
  }
14
13
 
@@ -34,27 +33,36 @@ server {
34
33
  error_page 404 /404.html;
35
34
  error_page 500 502 504 /500.html;
36
35
 
36
+ # Root Location
37
37
  location / {
38
-
39
38
  # this serves static files that exist without running other rewrite tests
40
39
  if (-f $request_filename) {
41
40
  expires 30d;
42
41
  break;
43
42
  }
44
43
 
45
- # this sends all non-existing file or directory requests to index.php
46
- if (!-e $request_filename) {
47
- rewrite ^(.+)$ /index.php?q=$1 last;
48
- }
49
-
50
-
51
-
52
44
  proxy_pass http://technogate_reverse_proxy;
53
45
  proxy_set_header Host $host;
54
-
55
- }
56
46
 
57
-
47
+ proxy_redirect off;
48
+
49
+ proxy_set_header Host $host;
50
+ proxy_set_header X-Real-IP $remote_addr;
51
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
52
+
53
+ client_max_body_size 10m;
54
+ client_body_buffer_size 128k;
55
+
56
+ proxy_connect_timeout 90;
57
+ proxy_send_timeout 90;
58
+ proxy_read_timeout 90;
59
+
60
+ proxy_buffer_size 4k;
61
+ proxy_buffers 4 32k;
62
+ proxy_busy_buffers_size 64k;
63
+ proxy_temp_file_write_size 64k;
64
+
65
+ }
58
66
 
59
67
  }
60
68
 
@@ -8,7 +8,6 @@ server {
8
8
  # This allows people to use stylesheet, javascript and images in their
9
9
  # maintenance html file
10
10
  if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
11
- expires 30d;
12
11
  break;
13
12
  }
14
13
 
@@ -34,27 +33,36 @@ server {
34
33
  error_page 404 /404.html;
35
34
  error_page 500 502 504 /500.html;
36
35
 
36
+ # Root Location
37
37
  location / {
38
-
39
38
  # this serves static files that exist without running other rewrite tests
40
39
  if (-f $request_filename) {
41
40
  expires 30d;
42
41
  break;
43
42
  }
44
43
 
45
- # this sends all non-existing file or directory requests to index.php
46
- if (!-e $request_filename) {
47
- rewrite ^(.+)$ /index.php?q=$1 last;
48
- }
49
-
50
-
51
-
52
44
  proxy_pass http://technogate_reverse_proxy;
53
45
  proxy_set_header Host $host;
54
-
55
- }
56
46
 
57
-
47
+ proxy_redirect off;
48
+
49
+ proxy_set_header Host $host;
50
+ proxy_set_header X-Real-IP $remote_addr;
51
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
52
+
53
+ client_max_body_size 10m;
54
+ client_body_buffer_size 128k;
55
+
56
+ proxy_connect_timeout 90;
57
+ proxy_send_timeout 90;
58
+ proxy_read_timeout 90;
59
+
60
+ proxy_buffer_size 4k;
61
+ proxy_buffers 4 32k;
62
+ proxy_busy_buffers_size 64k;
63
+ proxy_temp_file_write_size 64k;
64
+
65
+ }
58
66
 
59
67
  }
60
68
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-exts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.12.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &2154210240 !ruby/object:Gem::Requirement
16
+ requirement: &2154572660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.8.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2154210240
24
+ version_requirements: *2154572660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: capistrano_colors
27
- requirement: &2154209480 !ruby/object:Gem::Requirement
27
+ requirement: &2154572200 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.5.5
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2154209480
35
+ version_requirements: *2154572200
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: i18n
38
- requirement: &2154208620 !ruby/object:Gem::Requirement
38
+ requirement: &2154571680 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.6.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2154208620
46
+ version_requirements: *2154571680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activesupport
49
- requirement: &2154208160 !ruby/object:Gem::Requirement
49
+ requirement: &2154570720 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 3.1.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2154208160
57
+ version_requirements: *2154570720
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard
60
- requirement: &2154207660 !ruby/object:Gem::Requirement
60
+ requirement: &2154570260 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.6.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2154207660
68
+ version_requirements: *2154570260
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard-bundler
71
- requirement: &2154207000 !ruby/object:Gem::Requirement
71
+ requirement: &2154569720 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.1.3
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *2154207000
79
+ version_requirements: *2154569720
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: guard-rspec
82
- requirement: &2154206440 !ruby/object:Gem::Requirement
82
+ requirement: &2154569140 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 0.4.3
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *2154206440
90
+ version_requirements: *2154569140
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rspec
93
- requirement: &2154205800 !ruby/object:Gem::Requirement
93
+ requirement: &2154568680 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: 2.6.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2154205800
101
+ version_requirements: *2154568680
102
102
  description: ! 'Capistrano exts is a set of helper tasks to help with the initial
103
103
  server
104
104