-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstaging.nginx.conf
91 lines (69 loc) · 2.12 KB
/
staging.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
upstream kryptos_backend {
server excelplay-backend-kryptos:8080;
}
upstream dalalbull_backend {
server dalalbull:8002;
}
upstream dalalbulldaphne {
server dalalbulldaphne:8003;
}
upstream auth1 {
server auth1:8000;
}
server {
listen 80;
server_name backend.play.excelmec.org;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
return 301 https://$server_name$request_uri;
}
location /.well-known/acme-challenge {
allow all;
root /var/www/html;
}
}
server {
listen 443 ssl http2;
server_name backend.play.excelmec.org;
access_log /var/log/nginx/access_https.log;
error_log /var/log/nginx/error_https.log;
ssl_certificate /etc/letsencrypt/live/backend.play.excelmec.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/backend.play.excelmec.org/privkey.pem;
location /kryptos/ {
# Pass the IP address of the client to backend
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# pass the Host: header from the client
proxy_set_header Host $host;
# Prevent Nginx from attempting redirects
proxy_redirect off;
proxy_pass http://kryptos_backend/;
}
location /dalalbull/ {
# Pass the IP address of the client to backend
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# pass the Host: header from the client
proxy_set_header Host $host;
# Prevent Nginx from attempting redirects
proxy_redirect off;
proxy_pass http://dalalbull_backend/;
}
location /dalalbullws/ {
proxy_pass http://dalalbulldaphne/;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /auth/ {
proxy_pass http://auth1/;
proxy_set_header Host $host;
}
location /admin/ {
proxy_pass http://auth1/admin/;
proxy_set_header Host $host;
}
location /dbadmin/ {
proxy_pass http://dalalbull_backend/dbadmin/;
proxy_set_header Host $host;
}
}