-
Notifications
You must be signed in to change notification settings - Fork 5
/
nginx.conf
107 lines (95 loc) · 2.77 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
user nginx nginx;
error_log /tmp/nginx-error.log;
pid /tmp/nginx.pid;
events {
worker_connections 4096;
}
http {
upstream app_server_front {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
server ${DOCKER_NETWORK_GATEWAY}:8081 fail_timeout=0;
}
upstream app_server_sharing {
server ${DOCKER_NETWORK_GATEWAY}:9090 fail_timeout=0;
}
upstream app_server_request {
server ${DOCKER_NETWORK_GATEWAY}:9091 fail_timeout=0;
}
upstream app_server_runner {
server ${DOCKER_NETWORK_GATEWAY}:9092 fail_timeout=0;
}
client_max_body_size 0;
server {
listen 9443 ssl;
ssl_certificate /etc/ssl/swiftui-proxy.crt;
ssl_certificate_key /etc/ssl/swiftui-proxy.key;
ssl_protocols TLSv1.3;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://app_server_sharing/;
}
}
server {
listen 10443 ssl;
ssl_certificate /etc/ssl/swiftui-proxy.crt;
ssl_certificate_key /etc/ssl/swiftui-proxy.key;
ssl_protocols TLSv1.3;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://app_server_request/;
}
}
server {
listen 11443 ssl;
ssl_certificate /etc/ssl/swiftui-proxy.crt;
ssl_certificate_key /etc/ssl/swiftui-proxy.key;
ssl_protocols TLSv1.3;
location / {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://app_server_runner/;
}
}
server {
listen 8443 ssl;
ssl_certificate /etc/ssl/swiftui-proxy.crt;
ssl_certificate_key /etc/ssl/swiftui-proxy.key;
ssl_protocols TLSv1.3;
location /ws {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://app_server_front/ws;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://app_server_front/;
}
}
}