Manually Configuring Virtual Subhosts
For each Virtual Subhost you configure on your Virtual Server you will need
to create a new directory for the subhosted domain files and make an addition
your web server configuration file. It is probably best to create the new
subhosted domain directory in your Virtual Server ~/www/vhosts directory,
like this:
(if the vhosts directory does not already exist, do this first)
% mkdir ~/usr/local/etc/httpd/vhosts
(then make the subhosted domain name directory)
% mkdir ~/usr/local/etc/httpd/vhosts/subhost
NOTE: It was previously documented that the subhosted domain directory be created in the
~/www/htdocs directory (not the ~/www/vhosts directory). To insure compatibility with the lastest
version of Microsoft FrontPage,
we recommend that the subhosted domain directories not exist inside the ~/www/htdocs directory.
If you decide to use the vhosts directory for your subhosts (as recommended) and your Virtual Server was setup
prior to July 1, 1999, it is likely that a <Directory> definition will need to be created at the bottom
of your ~/www/conf/httpd.conf file (or at the bottom of your ~/www/conf/access.conf file if you
have three separate config files). The <Directory> definition you may need to add is as follows:
<Directory /usr/local/etc/httpd/vhosts>
Options Indexes FollowSymLinks Includes
AllowOverride All
order allow,deny
allow from all
</Directory>
After you have created the directory where the content for the subhosted domain name will reside, open up your
httpd.conf file (in your ~/www/conf directory) and add the following lines in the
<VirtualHost> section of the httpd.conf configuration file.
NOTE: Make sure you add the VirtualHost definitions in the correct place in your
httpd.conf file. If the VirtualHost definitions are not placed in the VirtualHost section of the
httpd.conf file, then you may encounter some compatibility problems with the latest version of
Microsoft FrontPage. If your Virtual Private
Server was setup with a single config file, the VirtualHost section of the httpd.conf file is found in
the middle of the file. If your Virtual Server was setup with triple config files (httpd.conf, srm.conf,
and access.conf), then the VirtualHost section is found at the bottom of the httpd.conf file.
(add the following lines to your httpd.conf)
# point www.alpineweb.org and alpineweb.org to subdirectory alpineweb
<VirtualHost www.alpineweb.org alpineweb.org>
ServerName www.alpineweb.org
ServerAdmin webmaster@alpineweb.org
DocumentRoot /usr/local/etc/httpd/vhosts/alpineweb
</VirtualHost>
NOTE: It is important that the first domain name you list in the
<VirtualHost...> directive matches the domain name you specify as the ServerName. This will insure
that problems do not occur if you install the latest version of
Microsoft FrontPage at a later date.
You will need to:
- substitute the subhosted domain name in the place of the alpineweb.org
occurrences in the example above; and
- replace the name of the subdirectory you choose for the subhosted
domain name in the place of wmg above. After you have completed
these simple steps, web requests for the subhosted domain name will
be directed to the directory you designated and web content will be
served from that directory.
You may also want to offer FTP access and Mail accounts for your Virtual Subhosts by using the vadduser
command or by using the iManager web-based
vadduser utility. When prompted for the "home" directory for the FTP account, you will want to specify
the same value that you use for the DocumentRoot definition. This will allow your subhosted client to
publish web content to the directory which the web server recognizes as the home directory for the subhosted
domain name.
|
|