lib/capistrano/recipes/templates/nginx.vhost.erb in capistrano_recipes-1.0.5 vs lib/capistrano/recipes/templates/nginx.vhost.erb in capistrano_recipes-1.1.0
- old
+ new
@@ -16,11 +16,16 @@
server_name <%= domain %>;
root <%= current_path %>/public;
access_log <%= shared_path %>/log/access.log main;
error_log <%= shared_path %>/log/error.log info;
-
+
+ <% if using_auth_basic? %>
+ auth_basic "Restricted Access";
+ auth_basic_user_file <%= nginx_htpasswd_file %>;
+
+ <% end %>
# Rewrite all the requests to the maintenance.html
# page if it exists in the doc root. This is for
# capistrano's disable web task
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
@@ -74,10 +79,15 @@
server_name <%= domain %>;
root <%= current_path %>/public;
access_log <%= shared_path %>/log/ssl-access.log main;
error_log <%= shared_path %>/log/ssl-error.log info;
-
+
+ <% if using_auth_basic? %>
+ auth_basic "Restricted Access";
+ auth_basic_user_file <%= nginx_htpasswd_file %>;
+
+ <% end %>
ssl on;
ssl_certificate <%= File.join nginx_ssl_certs_path, nginx_ssl_cert %>;
ssl_certificate_key <%= File.join nginx_ssl_private_path, nginx_ssl_key %>;
ssl_session_timeout 5m;
\ No newline at end of file