node.js - NodeJs (Express) wont listen to the IP and host in ubuntu -


i have deployed app ununtu.

this bin/www:

app.set('port', 3000); app.set('host','app.site.com'); var server = http.createserver(app); server.listen(port,'64.143.255.122');//i put here fake ip (deployed real one) server.on('error', onerror); server.on('listening', onlistening); 

i have created host in pc: 64.143.255.122 app.site.com , open browser in: http://app.site.com:3000 , not work.

but, if go via lynx, inside server, , write lynx http://localhost:3000 work, correct page.

what might problem?

thanks

did make iptables allow it?

try this:

iptables -a input -p tcp --dport 3000 -j accept 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -