Skip to content
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

[GOVCMSD8-363] Tweaks to nginx helpers #43

Open
Feng-Shui opened this issue May 8, 2019 · 1 comment
Open

[GOVCMSD8-363] Tweaks to nginx helpers #43

Feng-Shui opened this issue May 8, 2019 · 1 comment

Comments

@Feng-Shui
Copy link
Contributor

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.

@tobybellwood
Copy link

Thanks @Feng-Shui - we'll take a look!

@tobybellwood tobybellwood changed the title Tweaks to nginx helpers [GOVCMSD8-363] Tweaks to nginx helpers May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants