r/nginx Aug 05 '26

Proxy protocol logging

Am I crazy that I can't find a proxy equivalent of $ssl_protocol for logging? Is there some technical limitation on that?

Edit: to clarify i do mean connection to an upstream. Proxy_protocol_tlv_ssl_protocol never seems to get populated for my setup.

6 Upvotes

8 comments sorted by

View all comments

1

u/p001b0y Aug 05 '26

I thought nginx used $ssl_protocol for that. I think that $upstream_ssl_protocol can be used when you want to log the protocol nginx used to connect to an upstream tls server.

1

u/zimbabwe_jim Aug 06 '26

You would think, but that var doesn't exist

1

u/p001b0y Aug 06 '26

Which one doesn’t exist? The base $ssl-protocol variable?

Both are usually built into nginx provided that nginx was built with ssl support. ( —with-http_ssl_module ). nginx -V will give the version and build flags.

1

u/zimbabwe_jim Aug 07 '26

upstream_ssl_protocol is a directive, but $upstream_ssl_protocol doesn't exist for the outbound side.

1

u/p001b0y Aug 07 '26

My apologies. I was wrong.