•  · 5 friends

Setting nginx proxy_cache

Hello, I want to tell you there is a place I do not know.
I am using nginx for the server, but I am struggling with setting proxy_cache. Could you tell me how to set it up?
Also, if you enable caching, videos will not play in Safari.
💓0 😆0 😲0 😥0 😠0 0
  • 957
  • More
Replies (4)
    • I would suggest caching only for these UNA files:

          location ~* ^(/cache_public/|/plugins_public/|/modules/|/studio/|/template/).+\.(jpg|jpeg|gif|css|png|js|ico|svg)$ {
              expires 1M;
              access_log off;
              add_header Cache-Control "public";
              try_files $uri =404;
          }
      💓0 😆0 😲0 😥0 😠0 0
      • Thank you.
        Is it better not to use nginx's proxy cache?
        Could you tell me more specifically?
        💓0 😆0 😲0 😥0 😠0 0
        • You can use proxy_cache, but you need to understand why and what you are caching. In previous post I've specifies files which are safe to cache anywhere. In my example it's cached in client's browser.

          💓0 😆0 😲0 😥0 😠0 0
          • I understand.
            Because I used a translator, I could not understand it. Thank you.
            💓0 😆0 😲0 😥0 😠0 0
            Not logged in users can't 'Comments Post'.
            3
            2
            Added:
            Category:

            UNA - Network Infrastructure for Communities

            Close