Created
September 1, 2011 19:15
-
-
Save pcreux/1186998 to your computer and use it in GitHub Desktop.
Speed up nginx ssl proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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