Created
June 20, 2016 11:08
-
-
Save wokamoto/216a8564e29690e2397294125c486082 to your computer and use it in GitHub Desktop.
[nginx] Mime タイプごとに expires 設定 ref: http://qiita.com/wokamoto/items/fcce196fb331057beef6
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
map $sent_http_content_type $expires { | |
default off; | |
~image/ max; | |
~audio/ max; | |
~video/ max; | |
text/css 30d; | |
text/javascript 30d; | |
application/javascript 30d; | |
application/pdf max; | |
} |
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
server { | |
expires $expires; | |
# : | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment