Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi, This explains how to set up basic mass virtual hosting on Apache.
This is very useful if you are adding virtualhosts at different times as you do not need to keep restarting apache every time you add a new site.
In these instructions, I am assuming that you already have virtualhosts set up and working. If you do not, then please read the faq on how to set up virtualhosts first!!
Firstly, backup your httpd.conf in case there are any problems with the set-up.
Now uncomment the following two lines..
LoadModule vhost_alias_module modules/mod_vhost_alias.so
AddModule mod_vhost_alias.c
Add the following to the very bottom of the httpd.conf. If you already have virtualhost directives then you need to replace them..
#
# Set up the mass virtual hosting
#
<VirtualHost *:80>
UseCanonicalName off
VirtualDocumentRoot /www/%0
VirtualScriptAlias /www/%0/cgi-bin
ServerSignature EMail
</VirtualHost>
# End mass hosting set up
To explain how this works: Apache will replace %0 with the actual full domain that is requested. So, for example, if the visitor requested www.mydomain123.com then apache will look for the DocumentRoot in /www/www.mydomain123.com and the cgi-bin in /www/www.mydomain123.com/cgi-bin
You now need to configure the directories with your files in them to correspond with this set-up. Change all your virtualhost directories to the FULL domain name. So www.me.com would be called from /www/www.me.com and so on..
To set up subdomains, just change the directory name to match.. Eg. subdomain.domain.com would be called from the /www/subdomain.domain.com directory.
If you have scripts with the paths defined, you will also need to alter them to reflect these changes..