generated from keycloakify/keycloakify-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
62 lines (51 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
50
51
52
53
54
55
56
57
58
59
60
61
62
worker_processes 2;
error_log /var/log/nginx/error.log;
#access_log /var/log/nginx/access.log;
# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv2 SSLv3;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
http {
include mime.types;
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 default_server;
listen [::]:443 default_server;
ssl_reject_handshake on;
server_name _;
return 444;
}
server {
listen 80;
listen [::]:80;
server_name sso.fornetcode.com;
# redirect all HTTP requests to HTTPS with a 301 Moved Permanently response
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name sso.fornetcode.com;
#ssl_certificate cert.pem;
#ssl_certificate_key cert.key;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080;
}
location ~/(admin|welcome|metrics|health) {
#allow 127.0.0.1
deny all;
return 404;
}
}
}