Reputation: 13908
I've installed ghost as per the instructions on the official documentation: http://support.ghost.org/installing-ghost-linux/
When I run ghost in development or prod mode, I get this output:
Ghost is running in development...
Listening on 127.0.0.1:2368
Url configured as: http://localhost:2368
Which is exactly what I expect. Now my remote server has an ip of something, lets say 123.456.68.1
. I should be able to hit the running ghost server by going to http://123.456.68.1:2368
right? Well when I try doing that I get this error:
Failed to load resource: net::ERR_CONNECTION_REFUSED
What am I doing wrong? Please help!
NOTE
If I run a node server on port 80 I can hit it by going to 123.456.68.1
. For somereason I cant hit the ghost server.
Upvotes: 0
Views: 638
Reputation: 869
Without some more details on where your server is ect this is a bit hard to answer.
First check to ensure that your server socket is bound to the correct interface. The fact that it is saying it is on 127.0.0.1 may mean that it is bound to the loopback interface and this means that you can't connect to it from another machine. Run the following to check:sudo netstat -ntlp
. If this shows your process bound to 127.0.0.1 then this is likely the problem. You can fix it by passing 0.0.0.0 in the listen call: connect().use(connect.static('public')).listen(3000, "0.0.0.0");
If that isn't the problem then it is likely that you network setup is the problem. There are many places here it could be. Firewalls, routers, port forwarding configurations ect. If the above doesn't work then we will need to know a little bit more about your setup to help further.
Upvotes: 2