forked from SocialEngine/docker-nginx-spa
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx-site.conf
44 lines (38 loc) · 807 Bytes
/
nginx-site.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
charset utf-8;
tcp_nopush on;
tcp_nodelay off;
client_header_timeout 10s;
client_body_timeout 10s;
client_max_body_size 128k;
reset_timedout_connection on;
gzip on;
gzip_types
text/css
text/javascript
text/xml
text/plain
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
application/atom+xml
font/truetype
font/opentype
font/woff
font/woff2
image/svg+xml;
server {
listen 80;
server_name localhost;
root /app;
expires $expires;
# To make sure any assets can get through :)
location / {
try_files $uri @rewrites;
}
# If no asset matches, send it to your javascript app. Hopefully it's a route in the app!
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
}