我在該服務器中有一臺專用服務器,我部署了5個nodejs應用程序。根據nginx中的子域請求路由不同代理
domain name: www.nnd.com
dedicated server ip: xxx.xx.x.60
我有指向我的專用服務器IP的域。
子域是:
app1.nnd.com pointed to xxx.xx.x.60
app2.nnd.com pointed to xxx.xx.x.60
app3.nnd.com pointed to xxx.xx.x.60
app4.nnd.com pointed to xxx.xx.x.60
app5.nnd.com pointed to xxx.xx.x.60
現在nginx的基礎上,子域名,我需要路由代理配置文件。 例子:
{
listen:80;
server_name:xxx.xx.x.60
location/{
#here based on subdomain of the request I need to create proxy_pass for my node application
}
}
有什麼條件,我怎樣才能從代理頭原來的域名?
我只是映射的專用IP到我的sub-domain.so域名我主持它側,在設置映射我和我的專用IP。 – sridhar
所以我怎麼能得到原代理主機名 – sridhar
我想我錯過了一些東西,是不是所有的皮膚子域名ponting相同的IP?你是什麼意思原始主機名 –