It looks like this is a guide to running multiple wiki's out of one directory (folder). It would appear that you can use mediawiki to accomplish this by having multiple LocalSettings_x.php files, defined in a main LocalSettings.php file.
So, you would have a LocalSettings.php file that stores global settings and also points to LocalSettings_wiki1.php and LocalSettings_wiki2.php.
From my understanding, all of these would be in the same directory.
In the case of the virtual subfolder
I don't think Apache needs to be aware, it looks like you can define mydomain.com/wiki1 within the php files, and the wiki will "know" how to handle this.
In the case of subdomain
(wiki1.youromain.com, wiki2.yourdomain.com) Apache config is needed, it needs to be told to point to the proper place, this is accomplished with Apache virtual hosts.
Your case might look something like this:
<VirtualHost *:80> DocumentRoot "/var/www/mediawiki" ServerName wiki1.mydomain.com DocumentRoot "/var/www/mediawiki" ServerName wiki2.mydomain.com </VirtualHost>
The confusion in this setup you're running everything out of 1 folder, with virtual url paths. For example, a visitor would type mydomain.com/wiki2, but /var/www/wiki2 would not exist on your server, it would be directed behind the scenes as defined by LocalSettings.php
N.B. This is a a theoretical answer to the question, as I have no experience with Mediawiki and limited experience configuring apache. I will edit as needed.