aboutsummaryrefslogtreecommitdiff

ZS - How To Set Up SSL inc. Client Authentication with Apache 2

Some integration tests require SSL protection of the service endpoint with SSL Client Authentication. Here's a quick guide how to set up an Apache 2 service on localhost as a SSL terminating reverse proxy to the zusemsg endpoint that runs on http://localhost:8081/.

  1. Install Apache 2.
  2. Ensure that mod-proxy is installed and enabled.
  3. In default-ssl.conf add the following lines to proxy requests from https://localhost/zusemsg to http://localhost:8081:

     ProxyRequests off
     ProxyPass /zusemsg/ http://localhost:8081/
     ProxyPassReverse /zusemsg/ http://localhost:8081/
     <Proxy *>
       Order allow,deny
       allow from all
     </Proxy>
    
  4. Use certificate and key provided in this repository for the TLS connection and add the following directives to default-ssl.conf:

     SSLCertificateFile <path/to/repo/ssl/server>/server.localhost.cert.pem
     SSLCertificateKeyFile <path/to/repo/ssl/server>/server.localhost.key.pem
     SSLCertificateChainFile <path/to/repo/ssl/server>/ca-chain.cert.pem
    
  5. Trust the client certificate with the following directive in default-ssl-conf:

     SSLCACertificateFile <path/to/repo/ssl>/trusted-cas-bundle.pem