Last active
July 3, 2018 12:18
-
-
Save emmiep/eee0e3a3815e94f7acd9e11e06e15184 to your computer and use it in GitHub Desktop.
Nginx basic SPA config
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
| http { | |
| server { | |
| listen 80; | |
| root /usr/share/nginx/html; | |
| location / { | |
| internal; | |
| } | |
| location ~ ^/(js/|img/|css/|favicon\.ico$) { | |
| try_files $uri =404; | |
| } | |
| location ~ (^/|/[^./]+/?)$ { | |
| rewrite ^/(.+)/$ /$1 permanent; | |
| try_files $uri.html /index.html; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment