-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathnginx.production.conf
47 lines (38 loc) · 1.46 KB
/
nginx.production.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
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name ${OMEJDN_DOMAIN};
ssl_certificate /etc/nginx/omejdn.cert;
ssl_certificate_key /etc/nginx/omejdn.key;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
# Proxy to Omejdn
location ${OMEJDN_PATH} {
rewrite ${OMEJDN_PATH}/(.*) /$1 break;
proxy_pass http://omejdn-server:4567;
proxy_redirect off;
}
# Proxy to the Admin UI
location /${UI_PATH} {
rewrite ${UI_PATH}/(.*) /$1 break;
proxy_pass http://omejdn-ui;
proxy_redirect off;
}
# Well-Known URIs
location /.well-known {
# RFC 8414 style metadata document and compatibility backup
rewrite /\.well-known/oauth-authorization-server${OMEJDN_PATH} ${OMEJDN_PATH}/.well-known/oauth-authorization-server last;
rewrite /\.well-known/openid-configuration${OMEJDN_PATH} ${OMEJDN_PATH}/.well-known/openid-configuration last;
# Webfinger
rewrite /\.well-known/webfinger ${OMEJDN_PATH}/.well-known/webfinger last;
# Fix for old connectors
rewrite /\.well-known/jwks.json ${OMEJDN_PATH}/jwks.json last;
}
}
# Redirect Legacy HTTP Traffic
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}