-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.nginx.conf
55 lines (43 loc) · 1.47 KB
/
app.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
server {
listen 80;
listen [::]:80;
server_name localhost;
server_tokens off;
client_max_body_size 1G;
proxy_intercept_errors on;
error_page 404 /404.html;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /api {
proxy_pass http://backend:3000;
proxy_set_header Host $host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /images/full {
proxy_pass http://backend:3000/images/;
proxy_set_header Host $host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /images/tiny {
rewrite ^/images/tiny/(.*)$ /insecure/resize:fit:20:0:no:0/plain/http://backend:3000/images/$1 break;
proxy_pass http://imgproxy:8080;
proxy_set_header Host $host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /images {
rewrite ^/images/(.*)$ /insecure/resize:fit:825:0:no:0/plain/http://backend:3000/images/$1 break;
proxy_pass http://imgproxy:8080;
proxy_set_header Host $host;
proxy_set_header x-forwarded-for $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}