Created
April 2, 2019 07:02
-
-
Save inyee786/145dc492ee4a5d6ef61d4e4a0f758a0b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Expires map | |
map $sent_http_content_type $expires { | |
default off; | |
text/html epoch; | |
text/css max; | |
application/json max; | |
application/javascript max; | |
~image/ max; | |
} | |
server { | |
listen 80; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
try_files $uri $uri/ /index.html =404; | |
} | |
expires $expires; | |
gzip on; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment