# Nginx להגשת קבצים סטטיים?

**URL:** <https://meta.discourse.org/t/nginx-to-server-static-files/201323>\
**Category:** Development\
**Created:** [22 באוגוסט,‏ 2021,‏ 9:21am UTC](https://meta.discourse.org/t/nginx-to-server-static-files/201323 "2021-08-22T09:21:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![valsha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/valsha/32/230631_2.png) [@valsha](https://meta.discourse.org/u/valsha)\
**Post date:** [22 באוגוסט,‏ 2021,‏ 9:21am UTC](https://meta.discourse.org/t/nginx-to-server-static-files/201323/1 "2021-08-22T09:21:20Z")

</div>

Hi, Does it make sense to serve static files using nginx?  
Something like:

```plaintext
 location ~ ^/assets/(?<asset_path>.+)$ {
      expires 1M;
      add_header Cache-Control "max-age=2629746, public";
    }
location ~ ^/user_avatar/(?<user_avatar_path>.+)$ {
      expires 1M;
      add_header Cache-Control "max-age=2629746, public";
    }
location ~ ^/uploads/(?<uploads_path>.+)$ {
      expires 1M;
      add_header Cache-Control "max-age=2629746, public";
    }

```

We are use nginx outside the container. Thank you.

---

_[View the full topic](https://meta.discourse.org/t/nginx-to-server-static-files/201323)._
