server { listen 80<%= ' default deferred' if default_site %>; server_name <%= domains.join("\n ") %>; root <%= current_path %>/public; passenger_enabled on; # Keep x instances alive passenger_min_instances <% app_instances.to_i %>; # Rails environment rails_env <%= rails_env %>; # Cache and Gzip Assets location ^~ /assets/ { gzip on; expires max; add_header Cache-Control public; } error_page 500 502 503 504 /500.html; client_max_body_size 4G; } <%= if pre_start %> passenger_pre_start http://<%= domains.first %>/; <% end %>