Files
sx-fc/config/deploy/shared/nginx.conf.erb
2019-12-20 12:00:21 +06:30

41 lines
913 B
Plaintext

server {
server_name <%= fetch(:server_name) %>;
listen 80;
passenger_enabled on;
rails_env production;
root <%= fetch(:deploy_to) %>/current/public;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
<% if fetch(:enable_ssl) %>
server {
server_name <%= fetch(:server_name) %>;
listen 443;
passenger_enabled on;
rails_env production;
root <%= fetch(:deploy_to) %>/current/public;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
ssl on;
ssl_certificate <%= fetch(:deploy_to) %>/shared/ssl_cert.crt;
ssl_certificate_key <%= fetch(:deploy_to) %>/shared/ssl_private_key.key;
}
<% end %>