0

I am trying to to setup a Ghost blog instance on port 80 of my CentOS 6 virtual server. There are no pre-installed web servers occupying port 80.

If I run Ghost in production mode as a background operation, I can curl it via localhost and 127.0.0.1 as expected but I have no luck with the external ip address. This behavior persists whether or not iptables has rules written into it.

Here is my netstat -ntl output:

Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 127.0.0.1:80                0.0.0.0:*                   LISTEN      9249/node           
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      2261/sshd           
tcp        0      0 127.0.0.1:5432              0.0.0.0:*                   LISTEN      6009/postmaster     
tcp        0      0 :::22                       :::*                        LISTEN      2261/sshd           
tcp        0      0 ::1:5432                    :::*                        LISTEN      6009/postmaster

Perhaps it is just my lack of expertise for server configuration but I cannot figure out how to get port 80 open over the internet.

Does anyone know what I am doing wrong?

2
  • Have you forwarded your modem/router port 80 to your CentOS LAN IP?
    – Kinnectus
    Commented Jul 8, 2014 at 6:58
  • This is a Linode server. Network equipment configuration is not in my control. Everything is handled through my Linux environment.
    – Pori
    Commented Jul 8, 2014 at 16:56

1 Answer 1

0

Looks like Ghost is only bound to localhost, not listening globally. In order to accept traffic from any address, the http server needs to be bound to 0.0.0.0:80, as in this example:

Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

Could you post the content of your config files?

(posting as an answer, due to insufficient points to comment)

1
  • Using 0.0.0.0 in the host ip configuration worked. I am not sure why this is not stated in the Ghost docs.
    – Pori
    Commented Jul 9, 2014 at 0:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .