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

Please add Nginx config notes in README #121

@IgorUsoltsev

Description

@IgorUsoltsev

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";
}

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