Created
October 17, 2013 10:19
-
-
Save kylewelsby/7022495 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
daemon off; | |
error_log /dev/stdout error; | |
worker_processes 4; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
log_format gzip '[$time_local] ' '"$request" $status $bytes_sent'; | |
access_log /dev/stdout; | |
charset utf-8; | |
default_type application/octet-stream; | |
types { | |
text/html html; | |
text/javascript js; | |
text/css css; | |
image/png png; | |
image/jpg jpg; | |
image/svg+xml svg svgz; | |
application/octet-steam eot; | |
application/octet-steam ttf; | |
application/octet-steam woff; | |
} | |
server { | |
listen 3353; | |
server_name local.example.com; | |
root app/; | |
add_header "X-UA-Compatible" "IE=Edge,chrome=1"; | |
location ~ ^/(scripts|styles)/(.*)$ { | |
root .tmp/; | |
error_page 404 =200 @asset_pass; | |
try_files $uri =404; | |
break; | |
} | |
location @asset_pass { | |
root app/; | |
try_files $uri =404; | |
} | |
location / { | |
expires -1; | |
add_header Pragma "no-cache"; | |
add_header Cache-Control "no-store, no-cache, must-revalicate, post-check=0 pre-check=0"; | |
root app/; | |
try_files $uri $uri/ /index.html =404; | |
break; | |
} | |
} | |
server { | |
listen 3354; | |
sendfile on; | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_disable "MSIE [1-6]\."; | |
gzip_min_length 1100; | |
gzip_vary on; | |
gzip_proxied expired no-cache no-store private auth; | |
gzip_types text/plain text/css application/x-javascript application/json text/javascript; | |
gzip_comp_level 9; | |
root dist/; | |
location ~ ^/(assets|bower_components|scripts|styles|views) { | |
expires 31d; | |
add_header Cache-Control public; | |
} | |
location / { | |
try_files $uri $uri/ /index.html =404; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment