This repository has been archived by the owner on Dec 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
59 lines (47 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
58
59
proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=backend_cache:10m max_size=10g
inactive=60m use_temp_path=off;
server {
listen 80 default_server;
server_name localhost;
resolver 127.0.0.11;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/css application/javascript application/json;
root /usr/share/nginx/html;
location / {
try_files $uri /index.html;
}
location /photos/ {
alias /usr/share/nginx/photos/;
}
location ~ ^/admin(?<fwd_path>.*) {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://gulag-admin:80$fwd_path$is_args$args;
}
location ~ /api/(?<fwd_path>.*) {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://gulag-api:3000/$fwd_path$is_args$args;
}
location ~ ^/exposition(?<fwd_path>.*) {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://gulag-exposition:80$fwd_path$is_args$args;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}