# ghost doctor
✔ Checking system Node.js version
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking operating system compatibility
✔ Checking for a MySQL installation
- sudo systemctl is-active ghost_new-atarlife-com
+ sudo systemctl reset-failed ghost_new-atarlife-com
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
# ghost run
+ sudo node current/index.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/opt/websites/atarlife/current/index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
@Hannah - It’s not a fresh droplet. The droplet has many other sites (most wordpress)
@DavidDarnes - I saw this too. I think the main issue I’m facing with all of the tutorials I’ve tried is that Ghost attempts to auto handle Nginx and I’m not letting. I’d rather handle that process manually as this is a live server. (I’ve already done a test with one click install etc. to play around and want to see what live would look like which is why I’m doing this on prod server)
Thank you both for chiming in! Hoping to figure this out as I’m intrigued by Ghost
@EBA can I recommend that you uninstall Ghost and reinstall?
This time, walk us through the steps and the logs from the install. It seems like something went wrong with the install, as Ghost isn’t currently loading but it’s hard to debug after-the-fact.
Once you get past the install part and have Ghost running, you’re also going to need to update your nginx config to match the one Ghost-CLI would produce:
For the nginx part - you can remove the commented line as it’s for sites where location is a subdirectory.
As for installing Ghost, I’ve never seen anything like this so struggling a bit. Something about your setup must be unusual, and it’s obviously something ghost doctor doesn’t know about
To start at the beginning, can you go through the prerequisites list and share your installed software versions for each item?
Then can you scroll down and verify that nginx, mysql, node and ghost-cli were all installed in the same way show in the official instructions?
And lastly can you run this command in your ghost install folder and share the result:
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/opt/websites/atarlife/current/index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
I think Your problem is between Cloudflare and your hostin ip.
It would appear that it is a subdomain of another site, so this needs particular configuration rules between cloudflare and your hosting. Where are you hosting it?
Could something like DNS issues prevent ghost from starting?
Cloudflare settings have been updated and so was NGNIX. I’ve used Cloudflare for years with various projects and doubt it’s related. But open to trialing anything at this point.
From everything I’ve read in the past few days, Im inclined to believe it’s related to permissions. Specifically, something with the module’s behind nodejs.
This is the only thing that I’m able to find wrong through the ghost process. Everything else is green check marks across.
I focused on this, because a 502 error, as you well know is a “Bad Gateway” error. So it would seem to be more a domain configuration error than a software one.
Unless you have not completed the ghost setup. In that case the site is offline, and would give an error of this type.