node.js - Deploying Ghost - How to define the root path of an application that is managed with NPM forever? -
i installed ghost blog subdomain (http://blog.example.com) on ubuntu 14.04 lts behind apache 2.4.7 proxy.
ghost located in var/www/html/ghost
, can started temporarily sudo npm start
, works fine.
however, when want permanently deploy ghost using npm forever, installed globally following official ghost guide, following error message:
info: forever processing file: index.js error: cannot start forever error: script /home/myuser/index.js not exist.
simply copying index.js
predefined npm forever root location not solve problem, ghost application not located there. tried sudo node_env=production forever start var/www/html/ghost/index.js
without success.
i 503 error - service unavailable.
how tell npm forever file in var/www/html/ghost/index.js
?
it sounds not giving forever correct file. error saying (error: script /home/myuser/index.js not exist.). there no index.js in /home/myuser directory.
so, start ghost forever first cd ghost directory:
cd /var/www/html/ghost
and forever start:
sudo node_env=production forever start index.js
should go once that
Comments
Post a Comment