How to use literal "." in Apache VirtualDocumentRoot
Frustratingly I have found my answer in the official docs - I clearly wasn't reading carefully enough... The final example says:
If you want to include the . character in a VirtualDocumentRoot directive, but it clashes with a % directive, you can work around the problem in the following way: VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0"
So for my case I need to use VirtualDocumentRoot /var/www/%-2+.0.com
.
My interpretation is that using the .0
sub-string variable "closes" the variable allowing the use of a literal .