This is part three of a practical series on building a complete Root CA to user authorization system using nginx and Apache. The first two parts covered deployment of a two-level PKI with a Root CA and three intermediate CAs (Person, Server, Code), certificate revocation via CRL, and an OCSP responder.
The current part focuses on server-side configuration for client certificate authentication. It explains how to force nginx and Apache to request, validate, and forward X.509 client certificates to applications, and what changes when the application terminates TLS directly without a proxy.
Key differences between password and certificate login are highlighted: with certificates the private key never leaves the client, while the server verifies the signature and builds the chain to a trusted root. The tutorial stresses that the list of accepted CAs must contain only the Person intermediate CA to avoid offering unrelated certificates to users.
Practical steps include issuing a client certificate with extendedKeyUsage = clientAuth and keyUsage containing digitalSignature, packaging it as PKCS#12 for browser import, and enabling mTLS with full directive references. All nine reference tables covering 331 parameters from nginx ngx_http_ssl_module, Apache mod_ssl, and OpenSSL are included.
Special attention is given to secure header passing, login CSRF protection using separate hosts and one-time tokens, and revocation checking on the server side using both CRL and OCSP. The material was verified on nginx 1.29.8, Apache httpd 2.4, OpenSSL 3.3.7, and Go 1.24.


