-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf.template
35 lines (30 loc) · 936 Bytes
/
nginx.conf.template
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
events {
}
http {
upstream keycloak-host {
server 10.123.123.123:${KEYCLOAK_EXTERNAL_PORT};
}
include /etc/nginx/include/*;
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name ${KEYCLOAK_HOST},${SERVER_HOST};
ssl_certificate /etc/nginx/certs/self-signed.crt;
ssl_certificate_key /etc/nginx/certs/self-signed.key;
set_real_ip_from 0.0.0.0/0;
real_ip_header X-Real-IP;
real_ip_recursive on;
location / {
proxy_pass https://keycloak-host;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port 443;
}
}
}