server { listen 80; server_name <%= site_domain %>; charset utf-8; root <%= root_dir %>/frontend/public; location / { proxy_pass http://127.0.0.1:<%= app_port %>; } location ~ ^/static/(.*)$ { try_files /$1 =404; <% if (is_development) { %> add_header cache-control must-revalidate; <% } else { %> expires max; <% } %> } location = /favicon.ico { } error_page 500 502 503 504 /50x.html; access_log /var/log/nginx/<%= site_domain %>.log; error_log /var/log/nginx/<%= site_domain %>.error_log debug; }