Unifix knowledge database - The original one

Dashboard - News - Search - List - About - Admin


Virtualhosts in apache

Author:mike - Sun Apr 27 10:59:03 2003

To activate virtualhosts write, in the end of the httpd.conf :

NameVirtualHost *

And after that you can add virtualhosts with this syntax, just make sure the dns names points to your servers ip:

<VirtualHost *>
    Documentroot /home/subdomain
    ServerName subdomain.cyberfamily.dk
    Serveralias www.subdomain.cyberfamily.dk
    ScriptAlias /cgi-bin/ "/home/subdomain/cgi-bin"
</VirtualHost>


Documentroot , tells apache where the .html files will be
ServerName , tells what name apache should call itself when a users requests a page from the virtualdomain
Serveralias , tells apache an alias for the vhost, for an instance www.
ScriptAlias , tells apache where to find cgi-scripts for vhost
Copyright(c) Unifix.org 2002-2011


Dashboard - News - Search - List - About - Admin
 
Powered by Mikjaer Consulting Solutions - Hosted by Specialhosting.dk