-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-nginx.conf
40 lines (32 loc) · 1.04 KB
/
nginx-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
server {
listen 443 ssl;
server_name localhost;
http2 on;
charset utf-8;
ssl_certificate /usr/nginx/ssl.crt;
ssl_certificate_key /usr/nginx/ssl.key;
location / {
root /usr/src/app/www;
# Try the static files first and then proxy to the app server
try_files $uri @app;
}
location @app {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix "";
proxy_set_header X-L2-Proxy-Name "nginx";
proxy_read_timeout 120s;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://app;
}
}
upstream app {
# Server in the app container
server nginx:80;
keepalive 4;
zone upstream_app 1m;
}