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

**URL:** <https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139>\
**Category:** Installation\
**Created:** [October 7, 2021, 11:08am UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139 "2021-10-07T11:08:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![KeyserSoze](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/keysersoze/32/2113_2.png) [@KeyserSoze](https://forum.ghost.org/u/KeyserSoze)\
**Post date:** [October 7, 2021, 11:08am UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/1 "2021-10-07T11:08:54Z")

</div>

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](http://localhost)”, I updated the URL to [http://ghostpi.collywobbles.com.au](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

```auto
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](https://pastebin.com/yC2Bj4xU)
- `/etc/enginx` has multiple files - let me know if you need to see any

thanks in advance!

---

<div class="post-metadata">

**Author:** ![prokopton](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@prokopton](https://forum.ghost.org/u/prokopton)\
**Post date:** [October 7, 2021, 3:22pm UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/2 "2021-10-07T15:22:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KeyserSoze](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/keysersoze/32/2113_2.png) [@KeyserSoze](https://forum.ghost.org/u/KeyserSoze)\
**Post date:** [October 7, 2021, 10:27pm UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/3 "2021-10-07T22:27:05Z")

</div>

Yep - all clean - from a fresh OS image too

---

<div class="post-metadata">

**Author:** ![prokopton](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@prokopton](https://forum.ghost.org/u/prokopton)\
**Post date:** [October 8, 2021, 5:14pm UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/4 "2021-10-08T17:14:35Z")

</div>

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.”

---

<div class="post-metadata">

**Author:** ![KeyserSoze](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/keysersoze/32/2113_2.png) [@KeyserSoze](https://forum.ghost.org/u/KeyserSoze)\
**Post date:** [October 9, 2021, 7:06am UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/5 "2021-10-09T07:06:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prokopton](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@prokopton](https://forum.ghost.org/u/prokopton)\
**Post date:** [October 9, 2021, 11:58am UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/6 "2021-10-09T11:58:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KeyserSoze](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/keysersoze/32/2113_2.png) [@KeyserSoze](https://forum.ghost.org/u/KeyserSoze)\
**Post date:** [October 9, 2021, 1:37pm UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/7 "2021-10-09T13:37:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![prokopton](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@prokopton](https://forum.ghost.org/u/prokopton)\
**Post date:** [October 9, 2021, 4:15pm UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/8 "2021-10-09T16:15:48Z")

</div>

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  
“user-name” with your Linux username and  
“[factnest.com](http://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](http://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 user-name:user-name /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?

---

<div class="post-metadata">

**Author:** ![EmpiricalEE](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/empiricalee/32/15201_2.png) [@EmpiricalEE](https://forum.ghost.org/u/EmpiricalEE)\
**Post date:** [October 26, 2021, 11:55am UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/9 "2021-10-26T11:55:56Z")

</div>

Early on you said:

> 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`

This is a fundamental issue. Your fix will not have resolved the underlying issue. I strongly suspect you will continue to have issues until this is resolved.

The `nginx` that gets installed in Raspberry Pi OS is not unusual, so I don’t think you should expect anything other than the documented behaviour. An empty `sites-available` and no `sites-enabled/default` is very unusual.

You should re-install `nginx` using `sudo apt install nginx`. You may need to delete `/etc/nginx` or ever re-install the OS to ensure your installation is correct.

---

<div class="post-metadata">

**Author:** ![jeff](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jeff/32/4900_2.png) [@jeff](https://forum.ghost.org/u/jeff)\
**Post date:** [October 27, 2021, 11:29am UTC](https://forum.ghost.org/t/ghost-setup-ssl-nginx-config-file-does-not-exist-skipping-ssl-setup/26139/10 "2021-10-27T11:29:08Z")

</div>

If you are running buster…

1. consider upgrading to latest stable - `bullseye`
2. consider using `certbot` aka LetsEncrypt directly - this will setup and manage the SSL certs for all Nginx sites on your pi - not just the Ghost ones.
3. I agree with the above comments - sounds like your initial `nginx` install borked, as the default site is always used on Debian/Ubuntu to prove the `nginx` install worked.
