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.
This explains how to use Namebased Virtualhosts on Apache 1.x. The following will also keep seperate logs for each Virtualhost, if you do not want this and you want all domains logs to be combined then remove the log entries in the virtualhost directives.
Uncomment
BindAddress *
Also uncomment
NameVirtualHost *
Then at the bottom (This makes it easier to find in the future) of the httpd.conf, add the following lines.. The lines starting with a # are comments and can be removed.
<VirtualHost *:80>
UseCanonicalName off
# Your domain name.
ServerName domain.co.uk
# Any variation of your domain name.
ServerAlias www.domain.co.uk
# Email address of server admin
ServerAdmin webmaster@domain.co.uk
# Location of the sites files
DocumentRoot /www/domain
# Location of your cgi-bin
ScriptAlias /cgi-bin/ "C:/www/domain/cgi-bin/"
# Location of the sites log files
ErrorLog logs/domain/error.log
CustomLog logs/domain/access.log common
CustomLog logs/domain/referer.log referer
CustomLog logs/domain/agent.log agent
# Add email to server generated files
ServerSignature EMail
</VirtualHost>
Just repeat this for each domain.
It will look something like the following:
<VirtualHost *:80>
UseCanonicalName off
ServerName domain.co.uk
ServerAlias www.domain.co.uk
ServerAdmin webmaster@domain.co.uk
DocumentRoot /www/domain
ScriptAlias /cgi-bin/ "C:/www/domain/cgi-bin/"
ErrorLog logs/domain/error.log
CustomLog logs/domain/access.log common
CustomLog logs/domain/referer.log referer
CustomLog logs/domain/agent.log agent
ServerSignature EMail
</VirtualHost>
<VirtualHost *:80>
UseCanonicalName off
ServerName domain1.co.uk
ServerAlias www.domain1.co.uk
ServerAdmin webmaster@domain1.co.uk
DocumentRoot /www/domain1
ScriptAlias /cgi-bin/ "C:/www/domain1/cgi-bin/"
ErrorLog logs/domain1/error.log
CustomLog logs/domain1/access.log common
CustomLog logs/domain1/referer.log referer
CustomLog logs/domain1/agent.log agent
ServerSignature EMail
</VirtualHost>
The first in the list is the default that is called if Apache doesn't recognise the server name.
If you decide to use seperate logs for each domain then to save yourself getting errors with the above added, make sure that the directories that are specified for the error logs exist..