# Insertar texto en nginx.conf para anonimizar parcialmente los registros de IP

**URL:** <https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308>\
**Category:** Development\
**Tags:** nginx\
**Created:** [24 Marzo, 2023 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:** 1

<div class="post-metadata">

**Author:** ![DMTryptamines](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmtryptamines/32/295548_2.png) [@DMTryptamines](https://meta.discourse.org/u/DMTryptamines)\
**Post date:** [24 Marzo, 2023 16:58 UTC](https://meta.discourse.org/t/insert-text-into-nginx-conf-to-partially-anonymize-ip-logs/259308/1 "2023-03-24T16:58:21Z")

</div>

Esencialmente, quiero modificar nginx.conf para insertar texto al final del archivo desde el siguiente enlace:

> **[Anonymizing Logs in NGINX and Apache](https://www.supertechcrew.com/anonymizing-logs-nginx-apache/)**
>
> How to anonymize logs in NGINX and Apache

Entiendo que necesito hacer esto con un hook en app.yml, pero me está costando entender exactamente cómo funciona. Más importante aún, intentar buscar esto en Google no ha arrojado ninguna documentación sobre cómo usar el comando `replace` ni publicaciones útiles en absoluto, sospecho que estoy usando la terminología incorrecta.

Encontré la siguiente publicación de alguien que intentaba hacer lo mismo, pero los ejemplos en el repositorio solo me dejan más confundido.

> [@How can I update nginx.conf without resetting it on rebuild?](https://meta.discourse.org/t/how-can-i-update-nginx-conf-without-resetting-it-on-rebuild/48102):
>
> Hi, I have a question - How can I update nginx.conf or discourse.conf without having it reset when the container is rebuilt? I edit the file using nano, save it. But when I rebuild the app, the original file is there instead of the updated one. Can someone help please? flushed

¿Alguien sabe qué necesito hacer aquí o dónde puedo encontrar documentación al respecto?

---

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