Forked from learncodeacademy/gist:ebba574fc3f438c851ae
Created
January 6, 2017 09:26
-
-
Save sheikhwaqas/e26cd1fec78c1af986c8a269482e0e3e to your computer and use it in GitHub Desktop.
Nginx Node Frontend / Load Balancer / Static Assets Caching
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
upstream project { | |
server 22.22.22.2:3000; | |
server 22.22.22.3:3000; | |
server 22.22.22.5:3000; | |
} | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://project; | |
} | |
location ~* \.(css|js|gif|jpe?g|png)$ { | |
expires 168h; | |
} | |
location /api { | |
expires 10m; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment