I've got two virtual hosts to serve the same site configured in Apache/2.4.18 (Ubuntu), one for http port 80, and the other for https port 443.
Currently I have them generating two separate log files: access.http.log
and access.ssl.log
but it's quite annoying to have to flip back and forth between the two during audits. I originally had both hosts log to the same file access.log
but I couldn't distinguish between the two when troubleshooting traffic requests.
I would like to log them to just one file again, but I can't find in the documentation how to log the port number of the request so I can tell the virtual hosts apart inline. Is this possible?
One sloppy way I noticed is that the protocol is logged in the http referrer (https://localhost/referringpage.php) but this isn't adequate enough since redirects and links could come from anywhere - I just want to log the port of the current request.