Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set long cache expiration for static content.

  • Loading branch information...
commit e205149fccae808af2cfaa3e6725aafdaa7b2f52 1 parent 82b976f
@atogle atogle authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lighttpd.conf.sample
View
9 lighttpd.conf.sample
@@ -63,6 +63,7 @@ accesslog.filename = var.accesslog
#
#--------------------------------------------------------------------
server.modules = (
+ "mod_expire",
"mod_rewrite",
"mod_alias",
"mod_access",
@@ -114,6 +115,14 @@ compress.allowed-encodings = ("bzip2", "gzip", "deflate")
compress.cache-dir = var.cachedir
compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml")
+# Expires Headers
+#--------------------------------------------------------------------
+# Set a long cache expiration for static content
+#
+#--------------------------------------------------------------------
+$HTTP["url"] =~ "^/static/" {
+ expire.url = ( "" => "access 1 years" )
+}
# File handling
#--------------------------------------------------------------------

0 comments on commit e205149

Please sign in to comment.
Something went wrong with that request. Please try again.