Skip to content

Instantly share code, notes, and snippets.

upstream accounting_secure {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
server unix:/var/apps/[FILTERED]/current/tmp/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 443;
location / {
rewrite ^/r-[a-z0-9]+/(.*)$ /$1;
if ($request_uri ~* "\.(ico|css|js|gif|jpe?g|png)\?[0-9]+$") {
expires max;
break;
}
}