I’ve been configuring my Ubuntu 16.04 droplet to run two ghosts blogs on two separate nginx server blocks. I’ve got the second ngnix server block running correctly and the second domain is pointing to the correct port and not the first server block. However I am getting a 502 error indicating Ghost isn’t running for that domain.
I’ve run a status check and here is the output from service ghost 2 status
ghost2.service: Failed at step CHDIR spawning /usr/bin/npm: No such file or directory ghost2.service: Main process exited, code=exited, status 200/CHDIR ghost2.service: Failed at step CHDIR spawning /usr/bin/npm: No such file or directory ghost2.service: Control process exited, code exited=status=200 ghost2.service: Unit entered failed state. ghost2.service: Failed with result ‘exit-code’. ghost2.service: Service hold-off time over, scheduling restart. Stopped ghost ghost2.service: Start request repeated too quickly. Failed to start ghost.
The first ghost service runs fine using the same /usr/bin/npm directory in the start up script. However, the directory doesn’t seem to exist.
I’m wondering what the issue might be and how I can get the second instance of ghost running.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This is a bit confusing. I would recommend double-checking your configuration. A CHDIR to /usr/bin/npm would be likely to fail as npm is a binary, not a folder. Can you share the steps you took in setting up the second site?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.