-
Notifications
You must be signed in to change notification settings - Fork 117
/
zadig-nginx.conf
39 lines (29 loc) · 960 Bytes
/
zadig-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
upstream zadig_portal {
server zadig-backend-0.zadig-backend:25000;
}
log_format zadigportallog '$remote_addr - $remote_user [$time_local] "$request" '
'$status $bytes_sent $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'$upstream_addr $host $sent_http_x_reqid $upstream_response_time $request_time';
server {
listen 80;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
# Make site accessible from http://localhost/
client_max_body_size 1024m;
proxy_send_timeout 500s;
proxy_read_timeout 500s;
location ~ /api{
proxy_pass http://zadig_portal;
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
}
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
location / {
root /zadig-portal/;
index index.html index.htm;
try_files $uri $uri/ @rewrites;
}
}