I have a web site, that is visited by many different mobile devices and embedded devices.
Quite often I encounter the issue, that some devices cannot connect.
The reasons can be:
- the device doesn't recognize an certain CA
- the device is too old and would require an older protocol TLS1.1
- the device requires an outdated crypto algorithm or just a crypto algorithm, that I didn't make available with me server conf.
As the devices are in remote locations, don't have easily accessible logs I would like to be able to analyze such issues with nginx logs.
I can do this by increasing the error-log log level to debug.
error_log /var/log/nginx/errors_with_debug.log debug;
However this logs contain loads of things which I am not interested in.
Is there any way to log detailed information only if an ssl connection was refused but have a normal error log level for all other cases?
So far I enable
debug logging, ask remote users who have issues with their devices to connect and record the the traces, disable debug level, reload nginx and analyze then the obtained traces.
In fact I would already be helped if I could just log the date and the ip address of any client that failed to connect due to SSL issues.
Ideally I'd also like to log the reason, but alerady knowing, that a connection was attempted but failed due to SSL would be very helpful.