Pergunta

I've created a very simple node application, and it works perfectly on my local environment.

the app is listening to port 8000 like:

var app = express();
// ... some codes in between ...
app.listen(8000);

and on my local environment I can access to the node app like:

http://localhost:8000

however, when I'm trying to make it work on my linode server (Ubuntu 10.04), I can't access to the node app with:

http://mydomain.com:8000

I'm sure that I have all the node_modules in place, because when I do

node app.js

it returns no error message and looks like it's running.

I'm thinking maybe it's because that I have apache2 setup for the http://mydomain.com, and I should do some kind of proxy setup, or it could be some issue that I don't know at all. I am really clueless and I can't find any related documents on Google... I know there must be a lot of things that I don't understand in between... please help me understand how to deploy node.js app to the server. Thank you all very much

Foi útil?

Solução

It sounds like it may be a firewall issue.

Did you ever follow the Linode guide on creating a firewall?
If so, then you'll need to explicitly allow port 8000:

-A INPUT -p tcp --dport 8000 -j ACCEPT
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top