Ghost setup - error fix - Nginx config file does not exist, skipping SSL setup

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.

· 2 min read
Ghost setup - error fix - Nginx config file does not exist, skipping SSL setup

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

issue raised in 2017
still open in 2022

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.

💡
sudo nano /usr/lib/node_modules/ghost-cli/extensions/nginx/index.js

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

💡
ghost restart
💡
sudo systemctl restart nginx