ngx_http_ssl_status_module
wget https://nginx.org/download/nginx-1.28.1.tar.gz
tar zxvf nginx-1.28.1.tar.gz
cd nginx-1.28.1/
patch -p1 < ../nginx-1.28.1-ssl-status.patch
patching file src/event/ngx_event.c
patching file src/event/ngx_event_openssl.c
patching file src/event/ngx_event_openssl.h
patching file src/event/quic/ngx_event_quic_ssl.c
./configure --prefix=/usr/local/nginx \
--with-http_v2_module \
--with-http_v3_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--add-module=../ngx_http_ssl_status_module
make
make install
http {
include mime.types ;
default_type application/octet-stream ;
......
server {
listen 80 ;
server_name localhost;
......
location /ssl_status {
ssl_status;
}
location /status {
stub_status ;
}
}
server {
server_name example.com;
listen 443 ssl default_server reuseport;
listen 8443 quic reuseport;
http2 on;
http3 on;
ssl_protocols TLSv1.3;
ssl_certificate /ssl /example.com.pem;
ssl_certificate_key /ssl /example.com.key;
location / {
return 200 "scheme=$scheme proto=$server_protocol
ssl_handshake_total=$ssl_handshake_total
ssl_handshake_ok=$ssl_handshake_ok
ssl_handshake_fail=$ssl_handshake_fail
ssl_handshake_reuse=$ssl_handshake_reuse
ssl_handshake_tcp_total=$ssl_handshake_tcp_total
ssl_handshake_tcp_ok=$ssl_handshake_tcp_ok
ssl_handshake_tcp_fail=$ssl_handshake_tcp_fail
ssl_handshake_tcp_reuse=$ssl_handshake_tcp_reuse
ssl_handshake_udp_total=$ssl_handshake_udp_total
ssl_handshake_udp_ok=$ssl_handshake_udp_ok
ssl_handshake_udp_fail=$ssl_handshake_udp_fail
ssl_handshake_udp_reuse=$ssl_handshake_udp_reuse
ssl_handshake_status=$ssl_handshake_status
ssl_handshake_reuse_status=$ssl_handshake_reuse_status\n
" ;
}
}
}
# curl 127.0.0.1/ssl_status
SSL Handshake Statistics:
-------------------------
Total: 25
TCP: 12 (OK: 12, Fail: 0, Reuse: 0)
UDP: 13 (OK: 13, Fail: 0, Reuse: 0)
# curl https://example.com/
scheme=https proto=HTTP/2.0
ssl_handshake_total=25
ssl_handshake_ok=25
ssl_handshake_fail=0
ssl_handshake_reuse=0
ssl_handshake_tcp_total=12
ssl_handshake_tcp_ok=12
ssl_handshake_tcp_fail=0
ssl_handshake_tcp_reuse=0
ssl_handshake_udp_total=13
ssl_handshake_udp_ok=13
ssl_handshake_udp_fail=0
ssl_handshake_udp_reuse=0
ssl_handshake_status=1
ssl_handshake_reuse_status=0