-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.nginx1.conf
More file actions
117 lines (84 loc) · 3.25 KB
/
Copy pathexample.nginx1.conf
File metadata and controls
117 lines (84 loc) · 3.25 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
server {
listen 80;
server_name servicesuat.bidvmetlife.com.vn;
return 301 https://servicesuat.bidvmetlife.com.vn$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name servicesuat.bidvmetlife.com.vn;
#SSL
#ssl_protocols TLSv1.2;
ssl_certificate ssl/servicesuat.bidvmetlife.com.vn.cer;
ssl_certificate_key ssl/servicesuat.bidvmetlife.com.vn.key;
##ssl_password_file ssl/ssl_password.txt;
#ssl_trusted_certificate ssl/client_certs.cer;
# This tells Nginx what CA to verify against
#ssl_client_certificate ssl/client_certs.cer;
# This tells Nginx to verify clients optionally if the client cert is presented in the request
#ssl_verify_client optional;
# security
include nginxconfig.io/security.conf;
# logging
access_log 'logs/servicesuat.bidvmetlife.com.vn.access_$logdate.log';
error_log 'logs/servicesuat.bidvmetlife.com.vn.error_$logdate.log' warn;
# remove sensitive headers
location / {
proxy_hide_header X-Powered-By;
proxy_hide_header Server;
proxy_hide_header X-Generator;
proxy_hide_header X-Runtime;
include global/cors.conf;
# Block public access due to metlife policy applied from May, 1st 2020
include nginxconfig.io/blockips.conf;
}
location /publicall {
allow all;
}
# reverse proxy for portal customer ui forwarded from https://servicesuat.bidvmetlife.com.vn/portal/customer/policies/* to C:/bml_gogreen/portal_ui/*
location ~ ^/portal/customer/policies(?:/(?<path>.*))?$ {
# allow anyone in 10.199.146.0/24, office vlan
#allow 10.199.146.0/24;
# allow anyone in 10.199.164.0/24, vpn vlan
#allow 10.199.164.0/24;
# allow anyone from internet (through F5 load balancer)
#allow 10.199.165.162;
# drop rest of the world
#deny all;
#root C:/bml_gogreen/portal_ui;
#rewrite ^/portal/customer/policies/(.*)$ /$1 break;
#index index.html;
root C:/bml_gogreen;
#root html;
try_files $uri $uri/../portal/customer/policies $uri/../portal/customer/policies/ $uri/../../portal/customer/policies $uri/../../portal/customer/policies/ /portal/customer/policies/index.html?$request_uri;
#try_files $path $path/index.html /index.html;
#try_files $uri /index.html;
}
# reverse proxy for portal admin ui forwarded from https://servicesuat.bidvmetlife.com.vn/portal/customer/policies/* to C:/bml_gogreen/portal_admin_ui/*
location ~ ^/portal/admin(?:/(?<path>.*))?$ {
# allow anyone in 10.199.146.0/24, office vlan
#allow 10.199.146.0/24;
# allow anyone in 10.199.164.0/24, vpn vlan
#allow 10.199.164.0/24;
# allow anyone from internet (through F5 load balancer)
#allow 10.199.165.162;
# drop rest of the world
#deny all;
#root C:/bml_gogreen/portal_admin_ui;
#root C:/bml_gogreen;
root html;
try_files $uri $uri/../portal/admin $uri/../portal/admin/ /portal/admin/index.html;
#try_files $1 $1/index.html /index.html;
#rewrite ^/portal/admin/(.*)$ /$1 break;
#index index.html;
#try_files $uri /index.html;
}
error_page 500 502 503 504 /50x.html;
error_page 403 /publicall/403_6.html;
location = /50x.html {
root html;
}
location = /publicall/403.html {
root html;
}
}