Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 server { | |
2 listen 127.0.0.1:{{port}} default_server; | |
3 server_name _; | |
4 root {{server_root}}; | |
5 index index.html; | |
6 | |
7 # Serve static assets. | |
8 location ^~ /juju-ui/ { | |
9 root {{server_root}}; | |
10 } | |
11 location = /favicon.ico { | |
12 expires 10d; | |
13 root {{server_root}}; | |
14 } | |
15 location = /index.html { | |
16 root {{server_root}}; | |
17 } | |
18 | |
19 {{if serve_tests}} | |
20 # Serve unit tests. | |
21 location ^~ /test/ { | |
22 alias {{tests_root}}; | |
23 } | |
24 {{else}} | |
25 # Redirect to site root so that the test URL does not directly | |
26 # reference the manifest file. This avoids automatically adding the URL | |
27 # to the application cache. | |
28 rewrite ^/test/ $scheme://$host/ redirect; | |
29 {{endif}} | |
30 | |
31 # Fall through to the single-page app for all other URLs. | |
32 location ~ / { | |
33 rewrite .* /index.html last; | |
34 } | |
35 } | |
OLD | NEW |