Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Dynamic VirtualHost ? |
|
Author |
|
fryser_d
Joined: 11 Aug 2017 Posts: 5 Location: Canada
|
Posted: Sat 12 Aug '17 3:06 Post subject: Dynamic VirtualHost ? |
|
|
Ok... We are a cloud website provider... we want to route our tenants to their new generated website !!BY DOMAIN!! with SSL certificate and SNI.
1- We want to use *.editor.xxxxxx.com and *.xxxxxx.com to route to xxxxxx.com with our wildcard SSL Certificate.
2- We want EVERY OTHER REQUEST to get their certificate FROM THE FILESYSTEM ORGANISED BY FOLDERS
EX:
exemple.com => get its certificate from \repository\exemple.com\certificate.crt
test.com => get its certificate from \repository\test.com\certificate.crt
fake.com => get its certificate from \repository\fake.com\certificate.crt
THE CONFIGURATION BELOW WORKS!
Code: |
<VirtualHost *:443>
ServerName wildcard.editor.xxxxxx.com
ServerAlias *.editor.xxxxxx.com
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile "/var/app/s3/ssl/editor.xxxxxx.com/certificate.crt"
SSLCertificateKeyFile "/var/app/s3/ssl/editor.xxxxxx.com/certificate.key"
SSLCertificateChainFile "/var/app/s3/ssl/editor.xxxxxx.com/certificate.chain"
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLSessionTickets Off
</VirtualHost>
<VirtualHost *:443>
ServerName wildcard.xxxxxx.com
ServerAlias *.xxxxxx.com
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile "/var/app/s3/ssl/xxxxxx.com/certificate.crt"
SSLCertificateKeyFile "/var/app/s3/ssl/xxxxxx.com/certificate.key"
SSLCertificateChainFile "/var/app/s3/ssl/xxxxxx.com/certificate.chain"
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLSessionTickets Off
</VirtualHost>
<VirtualHost *:443>
ServerName tenant1.ca
ServerAlias www.tenant1.ca
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile "/var/app/s3/ssl/tenant1.ca/certificate.crt"
SSLCertificateKeyFile "/var/app/s3/ssl/tenant1.ca/certificate.key"
SSLCertificateChainFile "/var/app/s3/ssl/tenant1.ca/certificate.chain"
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLSessionTickets Off
</VirtualHost>
|
This configuration is STATIC
We would want this DYNAMIC!!! Meaning We dont want to add a new VirtualHost to resolve the request for each tenant. We want to use one virtualhost but with variables
ex:
SSLCertificateFile "/var/app/s3/ssl/%host/certificate.crt"
SSLCertificateKeyFile "/var/app/s3/ssl/%host/certificate.key"
SSLCertificateChainFile "/var/app/s3/ssl/%host/certificate.chain"
Can we have some help please? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7377 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|