node.js - Accesing Ghost AWS Ubuntu Server in production -
i'm trying access ghost blog on aws ubuntu server via http://x.x.x.x:2368, site can't reached.
here steps made:
- git cloned myblog
- cd myblog , npm install --production
- npm start or npm start --production console says site running ok
config file
var path = require('path'), config; config = { production: { url: 'http://127.0.0.1:2368', mail: {}, database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost.db') }, debug: false }, server: { host: '127.0.0.1', port: '2368' } }, development: { url: 'http://127.0.0.1:2368', database: { client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost-dev.db') }, debug: false }, server: { host: '127.0.0.1', port: '2368' }, paths: { contentpath: path.join(__dirname, '/content/') } }, }
if try acces pc via http://x.x.x.x:2368 site can't reached
- port 2368 open on aws, did sudo ufw disable
testing aws ports simple node app:
var http = require('http'); var port = 2368; http.createserver(function(req, res){ res.writehead(200, {'content-type': 'text/plain'}); res.end('hello world!\n'); }).listen(port); console.log('listening on port', port);
result = works
this means must wrong config file ghost?
use following setting in config file
url : <external ip>:<port> server : 0.0.0.0 port : port
Comments
Post a Comment