類似這樣子
server {
listen 80;
server_name A.ABC.com;
location / {
proxy_pass http://localhost:1234;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
另外一個:
server_name B.ABC.com;
proxy_pass http://localhost:4321;
類似這樣子
server {
listen 80;
server_name A.ABC.com;
location / {
proxy_pass http://localhost:1234;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
另外一個:
server {
listen 80;
server_name B.ABC.com;
location / {
proxy_pass http://localhost:4321;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}