templates/nginx.conf.erb in capistrano3-nginx-2.0.5 vs templates/nginx.conf.erb in capistrano3-nginx-2.0.6
- old
+ new
@@ -9,9 +9,17 @@
}
<% end %>
# HTTP Server
+<% if fetch(:nginx_redirected_domains) %>
+server {
+ listen 80;
+ server_name <%= fetch(:nginx_redirected_domains) %>;
+ rewrite ^(.*) http://<%= fetch(:nginx_domains).gsub(/\s.*/,'') %> permanent;
+}
+<% end %>
+
<% if fetch(:nginx_use_ssl) %>
server {
listen 80;
rewrite ^(.*) https://$host$1 permanent;
}