-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.example.conf
53 lines (39 loc) · 1.16 KB
/
nginx.example.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
49
50
51
52
53
# enable gzip in nginx.conf
# gzip on;
# gzip_min_length 1k;
# gzip_comp_level 4;
# gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
# gzip_vary on;
# gzip_disable "MSIE [1-6]\.";
server {
listen 80;
server_name fullstack.io;
charset utf-8;
root /your/path/to/client/dist;
access_log logs/wundercast-web.access.log main;
error_log logs/wundercast-web.error.log debug;
location /api {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
# change this to your server host
proxy_pass http://127.0.0.1:8080;
}
location ~* ^.+\.(ico|gif|jpg|jpeg|png)$ {
access_log off;
expires 30d;
}
location ~* ^.+\.(css|js|txt|xml|swf|wav)$ {
access_log off;
expires 24h;
}
location ~* ^.+\.(html|htm)$ {
expires 1h;
}
location ~* ^.+\.(eot|ttf|otf|woff|svg)$ {
access_log off;
expires max;
}
location / {
try_files $uri /index.html;
}
}