Skip to content

Instantly share code, notes, and snippets.

@pcreux
Created September 1, 2011 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcreux/1186998 to your computer and use it in GitHub Desktop.
Save pcreux/1186998 to your computer and use it in GitHub Desktop.
Speed up nginx ssl proxy
# SSL Session Cache + Browser Leverage Caching
server {
ssl_session_cache shared:SSL:10m; # Reuse session => less handshakes => better perfs
# Proxy config ==============================================================
location / {
# Cache assets (Do NOT cache html pages as they contain AuthenticityTokens)
if ($request_uri ~* ^.+\.(svg|css|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2)$) {
add_header Cache-Control public;
expires max;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment