内容简介:nginx 記錄 TLS 連線資訊
想要在 nginx 的 access log 裡面記錄使用者在 HTTPS 連線使用的 TLS protocol 與 cipher。
在「 How can I let nginx log the used SSL/TLS protocol and ciphersuite?
」這邊有提到方向是 $ssl_protocol
與 $ssl_cipher
(出自「 Module ngx_http_ssl_module
」內的 Embedded Variables 章節)。
他的方式是在前面就插入 protocol,但我希望前面的欄位保持不變,把 protocol & cipher 放到後面,所以我就加了一個 /etc/nginx/conf.d/combined_ssl.conf
(這邊我用 ondrej
的 PPA,在設定檔裡會撈 /etc/nginx/conf.d/
下的設定,不確定其他的情況如何):
# log_format combined_ssl '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $ssl_protocol/$ssl_cipher';
然後本來用 combined
的 HTTPS 設定就改成 combined_ssl
。
來放一陣子再來分析,然後想看看要怎麼調整 cipher...
以上所述就是小编给大家介绍的《nginx 記錄 TLS 連線資訊》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
The Nature of Code
Daniel Shiffman / The Nature of Code / 2012-12-13 / GBP 19.95
How can we capture the unpredictable evolutionary and emergent properties of nature in software? How can understanding the mathematical principles behind our physical world help us to create digital w......一起来看看 《The Nature of Code》 这本书的介绍吧!