Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Please add Nginx config notes in README #121

Open
IgorUsoltsev opened this issue Dec 7, 2020 · 1 comment
Open

Please add Nginx config notes in README #121

IgorUsoltsev opened this issue Dec 7, 2020 · 1 comment

Comments

@IgorUsoltsev
Copy link
Contributor

I had a problem on my live Nginx server - cache routes gave me 404.

The issue appears when you have static resources caching enabled for media files. F.e. this config in nginx.conf file will lead to conflict with your module:

location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|webp|woff|woff2)$ {
  expires max;
  access_log off;
  add_header Cache-Control "public";
}

You have to change this to exclude your {route} directory:

# where "cache" is {route}
location ~* ^\/(?!cache).*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|webp|woff|woff2)$ {
  expires max;
  access_log off;
  add_header Cache-Control "public";
}
@IgorUsoltsev
Copy link
Contributor Author

I have opened PR for this - #122

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant