TCP source port used by Nginx proxy

Maxim Dounin mdounin at mdounin.ru
Tue Jul 23 18:46:15 UTC 2024


Hello!

On Tue, Jul 23, 2024 at 09:41:51AM +0000, See Hong Kwee wrote:

> I have been looking to log source port used by nginx proxy to 
> forward the traffic to upstream server. What is available is 
> $remote_addr and $remote_port which capture the client IP 
> address and port, the source port used by nginx proxy to 
> upstream seems to be missing.  
> 
> Is there any variable for that ? The use case is for 
> troubleshooting between the proxy and upstream.    

Unfortunately, there are no such variables.  For upstream 
connections, only the $upstream_addr variable with addresses of 
upstream servers is available (see 
http://freenginx.org/r/$upstream_addr for detalis).

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list