Ghost redirects to localhost:2368

Hi all,

I am trying to set up Ghost on Heroku: our blog is at talkativeblog.herokuapp.com

I am having trouble where some of the links and the image uploads are redirecting to localhost:2368 rather than to our blog.

The Heroku Procfile contains: web: npm start --production

I have created config.production.json in the blog’s root directory

Here is the contents of that file:
{
“url”: “http://blog.meettalkative.com/”,
“server”: {
“host”: “0.0.0.0”,
“port”: “2368”
},
“database”: {
“client”: “sqlite3”,
“connection”: {
“filename”: “content/data/ghost-local.db”
}
},
“mail”: {
“transport”: “Direct”
},
“logging”: {
“transports”: [
“file”,
“stdout”
]
},
“paths”: {
“contentPath”: “content”
}
}

Here are the Heroku logs:
2020-01-07T07:34:02.264372+00:00 app[web.1]: > ghost-on-heroku@3.0.0 start /app

2020-01-07T07:34:02.264374+00:00 app[web.1]: > node server.js

2020-01-07T07:34:02.264376+00:00 app[web.1]:

2020-01-07T07:34:05.574007+00:00 app[web.1]: [2020-01-07 07:34:05] INFO Ghost is running in production…

2020-01-07T07:34:05.575245+00:00 app[web.1]: [2020-01-07 07:34:05] INFO Your site is now available on http://localhost:2368/

2020-01-07T07:34:05.576174+00:00 app[web.1]: [2020-01-07 07:34:05] INFO Ctrl+C to shut down.

Not that there is nothing at localhost:2368.

Any idea what i am doing wrong?

Thanks!

@ksj1993 do you have a NODE_ENV=production environment variable set? If not then Ghost may be running in development mode and not reading your config.production.json file

@Kevin - I think so, but perhaps not correctly. I’ve set NODE_ENV as production in Heroku. Is there somewhere else I need to set that?

1 Like