lib/ms_deploy/templates/vhost.erb in ms_deploy-0.0.7 vs lib/ms_deploy/templates/vhost.erb in ms_deploy-0.0.10

- old
+ new

@@ -1,13 +1,13 @@ -upstream <%= application %>_server { +upstream <%= application %>_<%= stage %>_server { # fail_timeout=0 means we always retry an upstream even if it failed # to return a good HTTP response (in case the Unicorn master nukes a # single worker for timing out). # This is the socket we configured in unicorn.rb - server unix:/tmp/sockets/<%= application %>.sock fail_timeout=0; + server unix:/tmp/sockets/<%= application %>_<%= stage %>.sock fail_timeout=0; # for TCP setups, point these to your backend servers # server 127.0.0.1:8080 fail_timeout=0; # server 192.168.0.8:8080 fail_timeout=0; # server 192.168.0.9:8080 fail_timeout=0; @@ -65,12 +65,17 @@ # in the response headers do disable/enable buffering on a # per-response basis. # proxy_buffering off; if (!-f $request_filename) { - proxy_pass http://<%= application %>_server; + proxy_pass http://<%= application %>_<%= stage %>_server; break; } + + <% if auth_basic_title %> + auth_basic "<%= auth_basic_title %>"; + auth_basic_user_file <%= auth_basic_password_file %>; + <% end %> } # Rails error pages error_page 500 502 503 504 /500.html; location = /500.html {