1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
server {
listen 443 ssl;
server_name _;
ssl_certificate /path/to/certificate.crt;
ssl_certificate_key /path/to/private-key.key;
location / {
proxy_pass http://10.8.1.100;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /a/ {
proxy_pass http://10.8.1.101;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /b/ {
proxy_pass http://10.8.1.102;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
|