I’m using the Google XML Sitemaps plugin. I added the following file to my Trellis project: \nginx-includes\<site_name>\rewrites.conf.j2, and configured the following rewrite rules - as suggested by Arne Brachold:
In addition. The file is not templated to the remote’s /etc/nginx/includes.d/<site_name>/ directory. When manually copied, the rewrites.conf gets deleted. So, that means the file lacks a corresponding template in my local machine’s nginx-includes. Meaning that \nginx-includes\<site_name>\rewrites.conf.j2 is not correct. But, what should it be then? Please your help.
Does <site_name> in your path match the site key exactly? It wouldn’t work if it matches one of the site_hosts, unless they too match the site key exactly. It would be easiest to help if you post your wordpress_sites exactly and nginx-includes path, using the real site key instead of obscuring with “site_name.”
Could you help us understand what version of Trellis you are using? You could post the topmost entry in your CHANGELOG.md. For example, if you are using a version older than Dec 1, 2016, the nginx-includes path will not work (e.g., see docs diff for where includes were before).
Exact location of my rewrites.conf.j2: /nginx-includes/ventizo.com/rewrites.conf.j2. The nginx-includes folder is on the same level as site and trellis.
I re-ran the provision playbook with and without --tags nginx-includes - with the same NOK effect.
@Henk, thanks for posting the various info. That helps rule out certain issues.
Could you try moving the nginx-includes dir into your trellis dir? If that works (and we know that it isn’t perhaps an issue exclusive to Windows hosts), I’ll update the nginx-includes docs to clarify this placement.
example.com
├── site
└── trellis
└── nginx-includes