- hosts文件
127.0.0.1 client.sso.com
127.0.0.1 server.sso.com
- nginx配置
server {
server_name client.sso.com;
listen 80;
listen [::]:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
index index.html;
location / {
proxy_pass http://localhost:10480/;
}
}
server {
server_name server.sso.com;
listen 80;
listen [::]:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
index index.html;
location / {
proxy_pass http://localhost:10380/;
}
}