Forum Moderators: phranque
I've 2 wild card virtualhosts
<VirtualHost *:80>
ServerName www.live.domain.com
ServerAlias *.live.domain.com
VirtualDocumentRoot /var/www/sites/%1/
</VirtualHost>
and
<VirtualHost *:80>
ServerName www.trial.domain.com
ServerAlias *.trial.domain.com
VirtualDocumentRoot /var/www/trialsites/%1/
</VirtualHost>
but i want to share a wildcard ssl cert between them - currently looking like
<VirtualHost *:443>
ServerName *.ssl.subhub.com
SSLEngine on
<snip>
VirtualDocumentRoot /var/www/sites/%1/
</VirtualHost>
but i want to be able to look in /var/www/sites for the %1, use it if it exists or try /var/www/trialsites/%1 if it doesn't
almost like writing....
RewriteCond /var/www/sites/%1 -d
VirtualDocumentRoot /var/www/sites/%1/ [L]
VirtualDocumentRoot /var/www/trialsites/%1/ [L]
Is there ANY way i can do this without moving to a mod_vhost_alias solution? and if not can you point me to good resources for converting what i have to use mod_vhost_alias
If you will eventually have a large number of 'sites' and they may 'churn' a lot -- with accounts being added and deleted frequently, then consider using RewriteMap to call a small script to access a database file for easier administration and maintenance. There are also many "control panel" solutions as well...
Jim