# How to change nginx log rotation period

**URL:** <https://meta.discourse.org/t/how-to-change-nginx-log-rotation-period/43453>\
**Category:** Self-hosting\
**Created:** [4월 29, 2016, 1:48오후 UTC](https://meta.discourse.org/t/how-to-change-nginx-log-rotation-period/43453 "2016-04-29T13:48:57Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![gearoid](https://avatars.discourse-cdn.com/v4/letter/g/9f8e36/32.png) [@gearoid](https://meta.discourse.org/u/gearoid)\
**Post date:** [5월 3, 2016, 10:46오전 UTC](https://meta.discourse.org/t/how-to-change-nginx-log-rotation-period/43453/10 "2016-05-03T10:46:02Z")

</div>

Looking at web.template.yml there’s no hooks after logrotate’s configuration

> <https://github.com/discourse/discourse_docker/blob/master/templates/web.template.yml#L202>

Is the `custom commands` section of my app.yml a suitable location to put this until there’s a hook I can use ?

```plaintext
## Remember, this is YAML syntax - you can only have one block with a name
run:
  - exec: echo "Beginning of custom commands"

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-nginx-log-rotation-period/43453)._
