# Automatic injection with nginx as a proxy and an incompatible  web server

**URL:** <https://community.dynatrace.com/t/automatic-injection-with-nginx-as-a-proxy-and-an-incompatible-web-server/43748>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic\
**Created:** [January 22, 2024, 3:31pm UTC](https://community.dynatrace.com/t/automatic-injection-with-nginx-as-a-proxy-and-an-incompatible-web-server/43748 "2024-01-22T15:31:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes123123](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Johannes123123](https://community.dynatrace.com/u/Johannes123123)\
**Post date:** [January 22, 2024, 3:31pm UTC](https://community.dynatrace.com/t/automatic-injection-with-nginx-as-a-proxy-and-an-incompatible-web-server/43748/1 "2024-01-22T15:31:41Z")

</div>

Hello everyone. We’re using nginx

- as a reverse proxy that terminates TLS connections from browsers and

- to forward requests to upstream servers also via TLS

Our front end is served by caddy2 what is not compatible with the auto injection feature.

I’m wondering if auto injection should also work in nginx when only used as a proxy.

Any experiences with that?

Thanks. Johannes

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [January 22, 2024, 3:54pm UTC](https://community.dynatrace.com/t/automatic-injection-with-nginx-as-a-proxy-and-an-incompatible-web-server/43748/2 "2024-01-22T15:54:38Z")

</div>

Hi&nbsp;[@Johannes123123](https://community.dynatrace.com/user/62490),

Auto injection works for nginx, but your traces will be ended on the nginx server. 😞

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [January 23, 2024, 9:38am UTC](https://community.dynatrace.com/t/automatic-injection-with-nginx-as-a-proxy-and-an-incompatible-web-server/43748/3 "2024-01-23T09:38:47Z")

</div>

Using Nginx and Opentelemetry with Caddy should do the trick.  
Even if Nginx is only acting as a proxy, it can&nbsp; work with the auto-injection feature, s  
Looks like Caddy supports opentelemetry and this can give you additional information about the traces.

> **[Caddy - The Ultimate Server with Automatic HTTPS](https://caddyserver.com/docs/caddyfile/directives/tracing)**
>
> Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

> **[OpenTelemetry and Dynatrace](https://docs.dynatrace.com/docs/ingest-from/opentelemetry)**
>
> Learn how to integrate and ingest OpenTelemetry data (traces, metrics, and logs) into Dynatrace.
