title: How to do client certificate authentication with Apache
body: <p>The question is very clear but I did not find any useful tutorial online. So I wish I could have some luck here.</p>
  
  <p>Basically, I want to build a client certificate authentication with Apache. I configured the conf file for Apache for the site I am hosting. The conf I put is here:</p>
  
  <pre><code>SSLVerifyClient require
  SSLVerifyDepth 1
  SSLCACertificateFile /etc/apache2/ssl/client.crt
  </code></pre>
  
  <p>However I have no idea how to generate the certificate and key file for the client. And also, what file should I put on the SSLCACertificateFile in the Apache server configurations?</p>
  
  <p>Does the server simply compare the certificate file sent from client with the certificate file on the server? What exactly the client certificate authentication is doing ?</p>