# Trellis not creating includes.d directory after running vagrant ssh

**URL:** https://discourse.roots.io/t/trellis-not-creating-includes-d-directory-after-running-vagrant-ssh/24932
**Category:** trellis
**Tags:** trellis
**Created:** 2023-03-08T16:12:52Z
**Posts:** 7

## Post 1 by @rguttersohn — 2023-03-08T16:12:52Z

I am trying to test out some custom NGINX customization locally before deploy to a remote server. I noticed that after adding a conf.j2 file, I wasn’t seeing my changes reflected in my local site.

I ssh’d into the VB, navigated to /etc/nginx and noticed there was no includes.d file like the [documentation](https://roots.io/trellis/docs/nginx-includes/) said there would be.

The only other post where someone experienced this [was here](https://discourse.roots.io/t/trellis-not-building-nginx-includes-on-provision/11345), but it turned out to be an issue with ssh’ing into the wrong server. So I know it’s something I am doing wrong.

Here’s my changes:

```
NGINX-Includes/mysite.com/custom-cache.conf.j2
```

After my last provision, I read through the tasks and confirmed there is no includes.d file being created.

Any idea what I am doing wrong here?

This site uses a bit of a dated version of Trellis (pull 992) if that helps.

---

## Post 2 by @ben — 2023-03-08T16:17:01Z

> [@rguttersohn](#):
>
> `NGINX-Includes/mysite.com/custom-cache.conf.j2`

Is your actual directory name `NGINX-Includes`? It should be `nginx-includes`

---

## Post 3 by @rguttersohn — 2023-03-08T16:26:55Z

My mistake. I wrote it from memory. My directory is indeed nginx-includes/mysite.com/custom-cache.conf.j2.

I did fix the issue though. I went to:

```
trellis/roles/wordpress-setup/defaults/main.yml
```

I added my website name to nginx\_includes\_templates\_path. So it looks like:

```
nginx_includes_templates_path: nginx-includes/mysite.com
```

I reprovisioned, and it added includes.d with my custom-cache.conf file.

Did I miss this in the documentation? Or perhaps this was a bug in this version of Trellis?

---

## Post 4 by @swalkinshaw — 2023-03-08T19:00:20Z

> [@rguttersohn](#):
>
> Did I miss this in the documentation? Or perhaps this was a bug in this version of Trellis?

No, you shouldn’t have to change the default variable. It’s a either a bug or something else strange :thinking:

---

## Post 5 by @rguttersohn — 2023-03-08T19:06:16Z

Just came across another issue. Trellis is not correctly scaffolding the includes.d directory in the vagrant machine. Instead of:

```
includes.d/mysite.com/custom-cache.conf
```

It is like this:

```
includes.d/custom-cache.conf
```

I’ve manually recreated the correct directory structure in the VB and added my custom-cache.conf. I can see my nginx changes implemented.

I am comparing my wordpress/roles/tasks/nginx-includes.yml to the trellis master branch nginx-includes.yml and can’t seem to find any difference. I am also not an Ansible expert, so it’s very possible I am missing something.

---

## Post 6 by @ben — 2023-03-08T19:14:55Z

Your Trellis version is from 2018. Can you reproduce this with the latest version?

---

## Post 7 by @rguttersohn — 2023-03-08T19:47:01Z

Ok it scaffolds correctly on our newer site using up-to-date Trellis.

Am I correct to assume the issue is in wordpress-setup/tasks/nginx-includes.yml of our older site?
