【发布时间】:2014-02-09 17:16:07
【问题描述】:
我刚刚在我的服务器(CentOS 6.5、x64)上安装了pump.io,我还在我的服务器上托管了一个 Ghost 博客(blog.mydomain.example),它位于 Apache 后面。我网站的首页是一个静态的html页面。
现在的问题是:当我访问 social.mydomain.example 时,我将被重定向到我的博客(URL 仍然是 social.mydomain.example)。我只能通过输入 social.mydomain.example:31337 来访问 pump.io,并且用户链接类似于 social.mydomain.example:31337/test。如何使端口号在 URL 中消失并通过 social.mydomain.example 访问 pump.io?谢谢!
以下是我服务器上的一些配置:
Apache 主机设置:
<VirtualHost *:80>
ServerName blog.mydomain.example
ProxyPreserveHost on
ProxyPass / http://127.0.0.1:2368/
</VirtualHost>
<VirtualHost *:80>
ServerName mydomain.example
ServerAlias www.mydomain.example
ProxyRequests off
DocumentRoot /var/www/html
</VirtualHost>
我如何安装 pump.io
cd /usr/bin/nodejs/
git clone https://github.com/e14n/pump.io.git
cd pump.io
npm install
cd pump.io/node_modules/databank
npm install databank-mongodb
cd /usr/bin/nodejs/pump.io/bin
forever start pump
我的 pump.io 配置
cat /etc/pump.io.json
{
"driver": "mongodb",
"params": {"host": "localhost"},
"secret": "pumpiol",
"noweb": false,
"port": 31337,
"site": "social.mydomain.example",
"owner": "NetAdmin",
"ownerURL": "http://mydomain.example",
"hostname": "social.mydomain.example",
"nologger": false,
"serverUser": "pumpio",
"uploaddir": "/var/local/pump.io/uploads",
"debugClient": false,
"firehose": "ofirehose.example"
}
我的 iptables 配置
-A INPUT -m state --state NEW -m tcp -p tcp --dport 31337 -j ACCEPT
我的 DNS 区域文件:
A (Host)
Host Points To
@ M.Y.I.P
CName (Alias)
Host Points To
blog @
social @
www @
【问题讨论】: