Mass Virtual Hosting allows you to automatically create 100s of websites by simply creating a “full.domain.name” folder. Each of these folders represent the DocumentRoot of a website.
You do not have to create any VirtualHost files, you do not have to restart Apache, you do not have to interact with your server.
This works well for command-line, and scripted/automated, creation and deletion of websites.
Enable Mass Virtual Hosting
To enable Mass Virtual hosting:
1. Load the Dynamic Mass Virtual Hosting configuration into Apache by editing file Config\Apache\httpd.conf and un-commenting line:
2. Remove the wildcard “*”
ServerAlias entry from the LOCALHOST VirutalHost files:
Otherwise localhost will catch (and respond to) all the unassigned mass domain names.
Create New Website
To create a new website, simply create a new folder:
Make sure that the domain name is resolved to an IP address via DNS or the Hosts file.
1. WampDeveloper Pro does not generally interact with these websites.
a) Websites Tab does not see these websites.
b) LocalDNS is not updated for these websites. You will need to manually update the Windows Hosts file to resolve full.domain.name to 127.0.0.1.
2. All logs go into one master/global log file.
a) Websites logs cannot be segmented into individual files: per domain or sub-domain. Log entries ARE formatted with the correct Virtual Host [sub.domain.tld] fields.
3. The normal fallback/default website (localhost) will no longer get used for non-defined (*) ServerName and ServerAlias.
4. All sites share a common \cgi-bin folder.
5. All sites share the same “outside webroot” folders (ex: \certs, \private, etc).
6. All sites share the same SSL certificate, which will need to be a wildcard cert or have multiple SAN (subjectAltName) entries.
7. Each website has only 1 domain name. For domain aliases, you will need to create a new website folder with an .htaccess file containing a redirect line: “Redirect / http://primary.domain.name/”
1. PHP and all other configurations are inherited due to use of the standard webroot path/structure: