When installing ghost you may face this issue of Nginx not being detected by ghost. This error occurs because ghost cli could not determine whether or not mysql/nginx is installed through its code.
Why is it happening ?
This issue has been there since 2017 and still has been not fixed
How to solve? Thanks to thomasqbrady we have temporary solution to this :
for that once you have run "ghost setup" you need to modify "/usr/lib/node_modules/ghost-cli/extensions/nginx/index.js" file for Ubuntu.
then replace this
async isSupported() { try { const services = await sysinfo.services('*'); return services.some(s => s.name === nginxProgramName); } catch (error) { return false; } }
with this :
async isSupported() { try { const services = await sysinfo.services('*'); return services.some(s => s.name.trim() === nginxProgramName); } catch (error) { return false; } }
then run "ghost setup nginx" if other setup completed else run "ghost setup"
you should also run