-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
71 lines (58 loc) · 1.67 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#site
server {
server_name sam-sla.net www.sam-sla.net;
sendfile on;
default_type application/octet-stream;
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 256;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain
text/css
application/json
application/javascript
application/x-javascript
text/xml
application/xml
application/xml+rss
text/javascript;
gzip_comp_level 9;
root /usr/share/site-frontend;
location / {
try_files $uri $uri/ /index.html =404;
}
}
#backend
server {
listen 80;
listen 443 ssl http2;
server_name api.sam-sla.net www.api.sam-sla.net;
ssl_certificate /etc/letsencrypt/live/sam-sla.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sam-sla.net/privkey.pem;
include /etc/nginx/includes/ssl.conf;
location / {
include /etc/nginx/includes/proxy.conf;
proxy_pass http://172.17.0.1:8090;
}
access_log off;
error_log /var/log/nginx/error.log error;
}
# keycloak
server {
listen 80;
listen 443 ssl http2;
server_name keycloak.sam-sla.net www.keycloak.sam-sla.net;
ssl_certificate /etc/letsencrypt/live/sam-sla.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sam-sla.net/privkey.pem;
include /etc/nginx/includes/ssl.conf;
location / {
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Server $http_host;
proxy_set_header X-Request-Id $request_id;
proxy_pass http://keycloak:8080;
}
access_log off;
error_log /var/log/nginx/error.log error;
}