Skip to content

Instantly share code, notes, and snippets.

@yanzhihong23
Created May 19, 2017 11:15
Show Gist options
  • Save yanzhihong23/b65ac377817f7260c7480a934379105f to your computer and use it in GitHub Desktop.
Save yanzhihong23/b65ac377817f7260c7480a934379105f to your computer and use it in GitHub Desktop.
nginx config for angular app deploy in subpath
server {
server_name gist.github.com
root /usr/share/gist;
index index.html
location / {
try_files $uri $uri/ =404;
}
location /avenger/ {
index /avenger/index.html;
expires -1;
add_header Pragma "no-cache";
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
try_files $uri$args $uri$args/ $uri/ /avenger/index.html =404;
}
error_page 404 /404.html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment