Trellis not creating includes.d directory after running vagrant ssh

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 said there would be.

The only other post where someone experienced this was here, 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:


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.

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

1 Like

My mistake. I wrote it from memory. My directory is indeed nginx-includes/

I did fix the issue though. I went to:


I added my website name to nginx_includes_templates_path. So it looks like:

nginx_includes_templates_path: nginx-includes/

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?

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

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


It is like this:


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.

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

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?