简体   繁体   中英

pump.io port in URL

I just installed pump.io on my server (CentOS 6.5, x64), and I also have a Ghost blog (blog.mydomain.example) hosted on my server, which is behind Apache. The home page of my site is a static html page.

Now the problem is: when I visit social.mydomain.example, I'll be redirected to my blog (the URL is still social.mydomain.example). I can only visit pump.io by entering social.mydomain.example:31337 and the user link would be something like social.mydomain.example:31337/test. How can I make the port number disappear in the URL and visit pump.io via social.mydomain.example? Thanks!

Here are some configurations on my server:

Apache host settings:

<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>

How I installed 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

My pump.io configuration

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"
}

My iptables configuration

-A INPUT -m state --state NEW -m tcp -p tcp --dport 31337 -j ACCEPT

My DNS zone file:

A (Host)
Host    Points To   
@   M.Y.I.P
CName (Alias)
Host    Points To
blog    @   
social  @   
www @

OK since I got the badge of Tumbleweed, I'm encouraged to provide an answer.

For those like me who want a self-own microblogging service along with a blog, a home page (multiple sub-domains with one host server), while don't want the port number shown in the url, I recommend storytlr . It meet all my needs and it has been easily installed on a CentOS server (mine is 6.5, x64). The latest stable release is 1.20. Simple and direct.

What you're doing is running pump.io behind a web server. The simplest and recommended installation is to run pump.io standalone, if you have the extra IP address for it.

The other common way of running pump.io is to put it behind nginx. Apache is not as well suited to this kind of reverse proxying/websockets work. Many of us have started out trying pump.io behind Apache and switched to nginx because it's easier to configure and troubleshoot.

See http://jrobb.org/moving-my-pump-home.html or http://sjoberg.fi/blog/pumpio.html for examples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM