Ghost setup ssl = "Nginx config file does not exist, skipping SSL setup"

Installed (ghost install i.e. not ghost install local - so I have a production config file.) current (4.17.1) version ghost, following this guide, with cli-version 1.17.3, on a raspberrypi4 with current buster OS.

NB: A couple of variations tot he guide were

  • used node14x
  • nginx was broken from the start (wouldn’t start with reason nginx: [emerg] open() "/etc/nginx/sites-enabled/default" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62), but I fixed it by commenting out include /etc/nginx/sites-enabled/*; from /etc/nginx/nginx.conf

So it’s all working from here.

After getting it all working on “http://localhost”, I updated the URL to http://ghostpi.collywobbles.com.au (my google domains DDNS.)

After getting all that sorted, I figured a bit of SSL is in order, so I run ghost setup ssl but it returns

Nginx config file does not exist, skipping SSL setup
ℹ Setting up SSL [skipped]

I’ve no idea where to go from here.

  • /etc/nginx/sites-enabled is empty
  • /etc/nginx/sites-available has one file localhost.conf
  • /etc/enginx has multiple files - let me know if you need to see any

thanks in advance!

Is this a clean install of nginx? No existing server block?

From my experience, Ghost likes a clean nginx install with no existing server block and preferably no existing SSL certificate.

Yep - all clean - from a fresh OS image too

My only suggestion would be to test if nginx works by creating a simple index.html test page on a domain. Then delete the server block.

If that doesn’t work, it may have something to do with “raspberrypi4 with current buster OS.”

I might need some step for that, if you have the time. If I just fumble round, I’ll F-it up.

I know little about the “raspberrypi4 with current buster OS.” I use Nginx with Ubuntu on x86 hardware. Although, Ubuntu and Buster OS are both based on Debian, there could be differences since Buster OS runs on Raspberry hardware.

You’ll need to search: how to create nginx server block buster os rasberry pi

My suggestion is to simply test if nginx actually works by creating a simple index.html test page.

All the best.

Yeah, no worries - happy to try that. I am just not clear on the steps to go it (assume I am new to all this, as I am.) e.g. i created the file with some text in the /etc/nginx/sites-available folder and then restarted ghost, but that does not appear to have done anything. Where do I create the file? do I need to do anything else, or is that it?

Once you create the server block, you need to enable it. I’m a newbie to Ghost also. Here’s how to do it in Nginx on Ubuntu. Just replace
“prokopton” with your Linux username and
factnest.com” with your domain.

Create server block for domain

#One time. Disable the default NGINX configuration file.
$ sudo unlink /etc/nginx/sites-enabled/default

#Create server block config file

$ sudo nano /etc/nginx/sites-available/factnest.com

server {
listen 80;
listen [::]:80;
server_name factnest.com;

root /var/www/factnest.com;
index index.html index.htm index.js;

location / {
    try_files $uri $uri/ =404;
}

}

#Enable your NGINX site.
$ sudo ln -s /etc/nginx/sites-available/factnest.com /etc/nginx/sites-enabled/

#Run NGINX’s configuration test to verify your configuration file.
$ sudo nginx -t

#Restart NGINX for the changes to take effect.
$ sudo service nginx restart

Config files

/etc/nginx/sites-available/factnest.com and
/etc/nginx/sites-enabled/factnest.com ARE THE SAME. Change sites-available and the other one changes.
Launch the website with test .html file

make webroot directory, chown, chmod 775 permission

$ sudo mkdir -p /var/www/factnest.com && sudo chown prokopton:prokopton /var/www/factnest.com && sudo chmod 775 /var/www/factnest.com && cd /var/www/factnest.com

#create index.html test page
$ sudo nano index.html

save file and exit

point browser to domain name

did you see the page?