-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
43 lines (34 loc) · 1.12 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
server {
listen 80;
listen [::]:80;
server_name example.com; # Adjust your domain here
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com; # Adjust your domain here
# Place here your SSL keys
ssl_certificate /etc/nginx/certs/.pem;
ssl_certificate_key /etc/nginx/certs/.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
# Backend base URL
location ~ ^/(api|auth|openapi.json) {
proxy_pass http://navigator-backend:8000; # container_name of the backend
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
# Frontend base URL
location / {
proxy_pass http://navigator-frontend:3000; # container_name of the frontend
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}