Too simple? Well, we can gain one level of complexity by using mod_evhost
. The "e" stands for extended and while it does a little more than mod_simple_vhost
, the configuration is even more minimal. In fact, there is only one option:
evhost.path-pattern = "/var/www/vhost/%3.%0/htdocs"
This example would do exactly the same as the code above, only using mod_evhost
instead of mod_simple_vhost
. The percent-signs with numbers are placeholders for the following values (in our example for the subdomain some.domain.myvirtualhost.net):
Placeholder |
Value |
Description |
---|---|---|
%0 |
"myvirtualhost.net" |
The domain name including top-level-domain |
%1 |
"net" |
The top-level-domain |
%2 |
"myvirtualhost" |
The domain name without top-level-domain |
%3 |
"domain" |
The subdomain name |
This implies that "%0" could also be stated as "%2.%1". We do not gain much flexibility over mod_simple_vhost
; the most common usage is:
evhost.path-pattern = "/var/www/vhost/%0/%3/htdocs"
So, we can have a directory...