-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnginx.conf
More file actions
44 lines (36 loc) · 1.03 KB
/
nginx.conf
File metadata and controls
44 lines (36 loc) · 1.03 KB
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
upstream flugbuech_api {
server api:8000 fail_timeout=0;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
http2 on;
# Note: In a production setup, you would configure HTTPS here.
# Character set
charset utf-8;
# Max upload size
client_max_body_size 8M;
# Proxy API endpoints
location /api/v1 {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://flugbuech_api;
}
# Static resources: Cache, no fallback
location ~* \.(?:png|jpg|jpeg|gif|ico|ttf|woff2)$ {
expires 30d;
alias /flugbuech/static/;
try_files $uri =404;
}
# Scripts and stylesheets: No cache, no fallback
location ~* \.(?:js|css)$ {
alias /flugbuech/static/;
try_files $uri =404;
}
# Server static application: Fallback to fallback.html
location / {
alias /flugbuech/static/;
try_files $uri /fallback.html;
}
}