I need an Apache server to offer multiple vhosts. Every vhost should only be accessible by one customer. To clear it up, I'll make a small example:
- vhost1: Servername: cust1.example.com
- vhost2: Servername: cust2.example.com
Now, only hosts from customer1 shoud be able to access vhost1 and only hosts from customer2 should be able to access vhost2. Here is what I did so far:
- Set up a CA using openxpki (works)
- Created a certificate for every vhost and configured the vhosts appropriately (works)
- Imported the root certificate of the CA into server and clients (works)
- Tested if Client-SSL-Auth works without filtering. (Works)
But now I can't get the filtering to work. I would like to filter for the CN in the certificates. For vhost1 this would be that all certificates with a CN of "*.cust1.example.com" would be allowed to access the ressource. How can I achieve this?
Bonus: Would be great to be abble to manage the change with puppet
Regards, Christian