Skip to content

[GOVCMSD8-363] Tweaks to nginx helpers #43

@Feng-Shui

Description

@Feng-Shui

I'd like to propose a few tweaks to the Nginx helpers:

.docker/images/nginx/helpers

1: Can we rename these so they have numerical prefixes inline with the Amazee nginx config. This keeps things consistent and the load order predictable.

2: The Amazee location blocks all have the ability to include additional conf.d files before and after the location definition. This is really nice if you want to do extra stuff in them. Propose that for those helpers declaring a location, that include directives are added for this purpose and to bring them inline with the Amazee locations, for example:

# Only cache binary files for 30 minutes. These are the default allowed file extensions uploads that are not images.
location ~* ^/sites/default/files/.+\.(pdf|doc|...|webp|webm)$ {
    include /etc/nginx/conf.d/drupal/location_expires_prepend*.conf;
    expires 1800s;
    include /etc/nginx/conf.d/drupal/location_expires_append*.conf;
}

In our case, we're using fastcgi_intercept_errors to do some nice things with error handling in sites/default/files and so we need to get a couple of directives into this specific location.

Will put up a PR for these changes shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions