-
Notifications
You must be signed in to change notification settings - Fork 4
/
nginx.conf
48 lines (39 loc) · 1.39 KB
/
nginx.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
error_log /usr/local/var/log/nginx/error.log;
error_log /usr/local/var/log/nginx/error.log notice;
error_log /usr/local/var/log/nginx/error.log info;
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream diplio_upstream {
server 127.0.0.1:9000;
keepalive 64;
}
server {
server_name localhost;
access_log /usr/local/var/log/nginx/access.log;
root /var/www/html/diplio/client;
index index.html;
listen 80;
location ~ ^/api/ {
proxy_redirect off;
proxy_http_version 1.1;
proxy_pass http://diplio_upstream;
}
location ~ ^/(bower_components/|variants/) {
root /var/www/html/diplio;
expires max;
}
location / {
add_header Pragma "no-cache";
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
expires -1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
try_files $uri $uri/ /index.html;
}
}
}