Last active
March 28, 2020 18:23
-
-
Save demisx/9500367 to your computer and use it in GitHub Desktop.
Nginx config for HTML5 AngularJS applications
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
server { | |
listen 8000; | |
server_name localhost; | |
root /Users/dmoore/projects/tutorials/angular-phonecat2/.build; | |
access_log "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.access.log"; | |
error_log "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.error.log"; | |
error_page 404 /app/404.html; | |
error_page 403 /app/403.html; | |
index index.html; | |
# SEO | |
if ($args ~ "_escaped_fragment_=/?(.+)") { | |
set $path $1; | |
rewrite ^ /snapshots/$path last; | |
} | |
location ~* \.(gif|jpg|jpeg|png|js|css)$ { | |
} | |
location / { | |
allow 127.0.0.1; | |
deny all; | |
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 $uri/ /index.html =404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pls how did u generate d snapshots u used on line 16