-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx-site.conf
executable file
·48 lines (41 loc) · 976 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
45
46
47
48
# pushState friendly!
# The setup:
# * javascript app is located at `${APP_DIR}`
charset utf-8;
tcp_nopush on;
tcp_nodelay off;
client_header_timeout ${CLIENT_HEADER_TIMEOUT}s;
client_body_timeout ${CLIENT_BODY_TIMEOUT}s;
client_max_body_size ${CLIENT_MAX_BODY_SIZE}k;
reset_timedout_connection 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
image/svg+xml;
server {
listen 80;
server_tokens off;
root ${APP_DIR};
# Redirect missing static files to index.html
# Magic behind making React Router work.
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
# Health check
location /_ping {
return 200 'Gangnam style!';
add_header Content-Type text/plain;
}
}