-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
49 lines (45 loc) · 1.7 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
worker_processes 1;
events { worker_connections 1024; }
http {
resolver 8.8.8.8;
resolver_timeout 10s;
server {
listen 443 ssl;
ssl_certificate /etc/nginx/certs/kiesi.app.crt;
ssl_certificate_key /etc/nginx/certs/kiesi.app.key;
server_name kiesi.app;
location / {
proxy_pass http://infopage:5000; # actual location of protected data
proxy_read_timeout 60s;
proxy_set_header X-Forwarded-Host $host; # Custom headers with authentication related data
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
}
}
server {
listen 443 ssl;
ssl_certificate /etc/nginx/certs/kiesi.app.crt;
ssl_certificate_key /etc/nginx/certs/kiesi.app.key;
server_name demo.kiesi.app;
location /api/ {
proxy_pass http://back:3001/;
proxy_read_timeout 60s;
proxy_set_header Host $host;
proxy_set_header X-My-Real-IP $remote_addr; # Additional parameters to send to login page
proxy_set_header X-My-Real-Port $remote_port;
proxy_set_header X-My-Server-Port $server_port;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
}
location / {
proxy_pass http://front:5000;
proxy_read_timeout 60s;
proxy_set_header Host $host;
proxy_set_header X-My-Real-IP $remote_addr; # Additional parameters to send to login page
proxy_set_header X-My-Real-Port $remote_port;
proxy_set_header X-My-Server-Port $server_port;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
}
}
}