# 在nginx.conf中插入文本以部分匿名化IP日志

**URL:** <https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308>\
**Category:** Development\
**Tags:** nginx\
**Created:** [2023 年3 月 24 日 16:58 UTC](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308 "2023-03-24T16:58:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2023 年3 月 24 日 17:19 UTC](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308/2 "2023-03-24T17:19:42Z")

</div>

请查看 [discourse\_docker/templates/web.template.yml at main · discourse/discourse\_docker · GitHub](https://github.com/discourse/discourse_docker/blob/main/templates/web.template.yml) 获取一些修改 nginx 配置的示例。

我通常的做法是手动修改容器内的配置文件进行测试，然后再修改 yml 文件，因为重新构建需要很长时间才能看到更改是否生效。

---

_[View the full topic](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308)._
