8000 Add nginx includes docs for overriding default includes directories by dalepgrant · Pull Request #544 · roots/docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add nginx includes docs for overriding default includes directories #544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions trellis/nginx-includes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ authors:
- fullyint
- Log1x
- swalkinshaw
- dalepgrant
---

# Nginx Includes
Expand All @@ -27,7 +28,9 @@ Append `--tags nginx-includes` to your command to run only the relevant portion

### Default

By default in Trellis, a WordPress site's Nginx conf will include any `nginx-includes` files found in a subdirectory named after the site. To illustrate, suppose you have two sites managed by Trellis, defined in `wordpress_sites` as follows:
By default in Trellis, a WordPress site's Nginx conf will include any `nginx-includes` files found in a subdirectory named after the site. Only the directories that match sites in your `wordpress_sites.yml` will be templated to the remote by default, with the addition of `all/`.

To illustrate, suppose you have two sites managed by Trellis, defined in `wordpress_sites` as follows:

```yaml
wordpress_sites:
Expand Down Expand Up @@ -80,7 +83,7 @@ This default `include` directive per site will not recurse subdirectories within

### File cleanup

By default, Trellis will remove from the remote's `includes.d` directory any `*.conf` file that lacks a corresponding template in your local machine's `nginx-includes`. If you prefer to leave all conf files on the remote, you may disable this file cleanup by defining `nginx_includes_d_cleanup: false` in `group_vars/all/main.yml`.
By default, Trellis will remove from the remote's `includes.d` directory any `*.conf` file that lacks a corresponding template in your local machine's `nginx-includes`. If removing config files results in an empty directory, that directory is not removed. If you prefer to leave all conf files on the remote, you may disable this file cleanup by defining `nginx_includes_d_cleanup: false` in `group_vars/all/main.yml`.

### Deprecated templates directory

Expand Down
0