【发布时间】:2014-01-30 14:40:53
【问题描述】:
我在该服务器中有一台专用服务器,我部署了 5 个 nodejs 应用程序。
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
}
}
有什么条件,如何从代理头中获取原始域名?
【问题讨论】: