Created
May 19, 2017 11:15
-
-
Save yanzhihong23/b65ac377817f7260c7480a934379105f to your computer and use it in GitHub Desktop.
nginx config for angular app deploy in subpath
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
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