Hey all,
So I’m trying to get logging to include which upstream hosts are being proxied to on each request. I’ve followed the documentation as best I can and have something that looks like the following.
https://example.com {
log / /var/log/caddy.log "{upstream} {remote} - [{when}] \"{method} {uri} {proto}\" {status} {size}" {
rotate
}
proxy / {
upstream 10.100.1.1:3001
upstream 10.100.1.2:3001
transparent
}
}
What I’m expecting to see in the logs is something like…
http://10.100.1.1:3001 59.167.104.55 - [02/Mar/2017:03:38:21 +0000] "GET /favicon.ico HTTP/2.0" 200 32988
http://10.100.1.1:3001 59.167.104.55 - [02/Mar/2017:03:38:22 +0000] "GET /en-AU/accounts/login HTTP/2.0" 200 1304
But what I actually get is…
http://10.100.1.1:3001 59.167.104.55 - [02/Mar/2017:03:38:21 +0000] "GET /favicon.ico HTTP/2.0" 200 32988
- 59.167.104.55 - [02/Mar/2017:03:38:22 +0000] "GET /en-AU/accounts/login HTTP/2.0" 200
All the requests to routes as opposed to images/files are not showing the virtualhost being proxied to. Is this correct? In case it’s relevant, requests are being proxied to Phusion Passenger running on the backends.
Cheers!
edit: deleted the template text for posting