| Virtual hosting, or
subhosting, is one of the most powerful features of the
Advanced Web (AW) Virtual Server System. With virtual
hosting you can support multiple domain names on a
single Virtual Server. In other words, you can host "bob.com"
and "jim.com" on the same Virtual Server, each
with its own domain name. You can also offer the
ability to give each virtual host their own unique FTP
login and access to their own subdirectory only, along
with creating e-mail addresses using their own domain
name.
An example of Virtual
Hosting on a Virtual Server can be found by accessing
the following URLs.
In this example, the
www.beckweb is the primary domain name of the Virtual
Server while www.myemail.nu is virtually subhosted. To
verify this, "ping" or "traceroute"
to each domain name- you will notice that they both
resolve to the same IP address.
BWSD offers this
functionality without charging for the virtual hosts
you maintain. For performance reasons, we have
established guidelines with regard to the number of
virtual hosts you should place on a single Virtual
Server System. Keep in mind that these guidelines are
suggested such that the performance of your own
server, and the other sites that you host on the
server, is not compromised.
-
AW25:
around 5 subhosts
-
AW75:
around 25 subhosts
- AW200:
around 60 subhosts
When used correctly,
virtual hosting offers you a powerful, low-cost
product that you can use to get your "foot in the
door" with prospective clients. You can use
virtual hosting to provide clients with a small sample
site for $10 to $20 per month, later upgrading them to
their own full Virtual Server as their needs expand.
This would be the case where someone was interested in
reselling virtual domain hosting, but was just
starting out, and didn't know how their business was
going to go.
BWSD will add a new
domain name (virtual host) to an existing Virtual
Server for a one time $30 setup fee per domain name.
You can request an additional domain name for a
Virtual Server you administrate by emailing
serviceNoSpamForUs@web-design.net.
More information
about virtual hosting can be found from the following
resources:
Virtual
Hosting Setup
You may be aware that
it is possible to configure the latest releases of
NSCA or Apache web servers to support what is known as
"Virtual hosting". Virtual hosting is a
popular concept because it allows multiple domain
names to be hosted on the same httpd Server. In fact,
much of our competition (and yours) markets Virtual
hosted packages for as little as $20-$25 dollars a
month. The lower price (with respect to Virtual
Servers) is justified by the fact that Virtual Hosting
does not offer as much power and flexibility as
Virtual Servers. This is illustrated by the fact that
you can configure a Virtual Server to perform Virtual
Hosting but the reverse cannot be done.
Virtual Hosting,
under the HTTP/1.0 specification, is based on IP
addresses, where the Server requests are sorted based
on the IP address and appropriate content is served
from a corresponding subdirectory of the Web Server.
Since Virtual Servers cannot be configured to host
multiple IP addresses, Virtual Hosting has been
previously unavailable. However, with the introduction
of the HTTP/1.1 spec, an "IP-less" virtual
hosting solution is now available. Many browsers,
servers, and spiders are now pseudo HTTP/1.1
compliant- i.e. some of the HTTP/1.1 features have
been implemented in an HTTP/1.0 based product.
The latest generation
of browsers (Netscape 2.0+, MSIE 3.0+) and spiders are
pseudo HTTP/1.1 compliant. The browsers and spiders
pass to the Web Server an environment variable "HTTP_HOST"
which identifies the domain name of the request. Using
this environment variable, the Virtual Servers can be
configured to respond to different domain name
requests from the same Server. This creates a
tremendous advantage for you as an BWSD Virtual Server
Administrator. Not only will you be able to offer high
end Virtual Servers, but you can market lower end
Virtual Hosted packages for a cost that is competitive
if not less than many other vendors in the market now.
You may have noticed
multiple companies emerging in the market lately
offering low end web services for "$19.95"
(they typically place a surcharge on bandwidth usage).
Now you too can offer a low cost solution by
partitioning up a Virtual Server (already a great
deal), into multiple low cost Virtual Hosted solutions
for potential clientele. BWSD believes that the
Virtual Hosting gives its server clients a tremendous
advantage in the web presence market and we sincerely
hope that you take advantage of this powerful feature.
For example, one of our competitors offers Virtual
hosted packages on T1's with 20 MB of space for
$19.95/month. They place a surcharge on bandwidth over
500 MB/month (we don't).... and from what we
understand they place approximately 250-300 servers on
each machine. So clearly, you can market a Virtual
Host on an BWSD Virtual Server as a superior
alternative.
Modifying
your httpd.conf file
To enable this feature on a Virtual Server you will
need to modify your httpd.conf file. For each domain
that you would like hosted on a Virtual Server, open
up your httpd.conf file (in the ~/www/conf directory)
and add the following at the end of the file:
#
point myemail.nu and www.myemail.nu to subdirectory
myemail
<VirtualHost myemail.nu www.myemail.nu>
ServerName www.myemail.nu
ServerAdmin webmaster@myemail.nu
DocumentRoot /usr/local/etc/httpd/htdocs/myemail
</VirtualHost>
Of course, you would
substitute your domain name and subdirectory in the
place of the "myemail.nu" and "myemail"
occurrences.
You will also want to
offer FTP access and POP accounts for your Virtual
Hosts 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 their Virtual Host. FTP and POP
capability is only available on the Fully Functional
Virtual Server (AW75) and Enhanced Fully Functional
Virtual Server (AW200). You may still use the AW25 for
virtual hosting, but you would not be able to give
those clients POP accounts at their domain (aliasing
-yes) and neither would you be able to give them an
FTP account.
Virtual Hosting and CGI
Access
There are some great
advantages of Virtual Hosting other than what has been
outlined above. Many of your potential Virtual Hosting
clientele will want cgi-bin access.... this can easily
be configured for a Virtual Host using the ScriptAlias
directive in your srm.conf file. For example, the
utahjrs.org site has its own cgi-bin. This can easily
added to the Virtual Host definition by simply using
the "ScriptAlias" directive as show below:
#
point myemail.nu and www.myemail.nu to subdirectory
myemail
<VirtualHost myemail.nu www.myemail.nu>
ServerName www.myemail.nu
ServerAdmin webmaster@myemail.nu
DocumentRoot /usr/local/etc/httpd/htdocs/myemail
ScriptAlias /cgi-bin/
/usr/local/etc/httpd/htdocs/myemail/cgi-bin/
</VirtualHost>
| It is
important to understand that giving cgi-bin
access to your virtually subhosted clients is a
potential security risk. This is because the
CGIs your customers upload and execute have all
of the rights and privileges of the CGIs you
execute. Therefore, it is possible for a
virtually subhosted client, which has been
granted CGI privileges, to read or remove any
file in your directory heirarchy. Moreover, it
is possible for a malicious subhosted client to
crack weak passwords and gain shell access to
your Virtual Server. Please see our document,
Virtual Subhosting and
Security Issues for more information.
|
|
Other advanced
Virtual Hosting configuration settings are discussed in
the document, "Advanced
Virtual Hosting Configurations".
[top]
Advanced
Virtual Hosting Configurations
In the basic Virtual
Hosting Setup instructions, a presentation of the
basic virtual host setup definitions is presented.
More advanced topics such as setting up ErrorDocument
handlers and individual logs are discussed below.
Pretty much any server
resource directive can be included in your Virtual
Host definition. For example, we can include the
definition of a "Not Found Document"
(ErrorDocument 404) in the "myemail.nu"
VirtualHost definition.
#
point myemail.nu and www.myemail.nu to subdirectory
myemail
<VirtualHost myemail.nu www.myemail.nu>
ServerName www.myemail.nu
ServerAdmin webmaster@myemail.nu
DocumentRoot /usr/local/etc/httpd/htdocs/myemail
ScriptAlias /cgi-bin/
/usr/local/etc/httpd/htdocs/myemail/cgi-bin/
ErrorDocument 404 /errors/notfound.html
</VirtualHost>
Note the file
location is specified with respect to the
DocumentRoot.... so the actual file location of the "notfound.html"
is at:
/usr/home/beckweb/usr/local/etc/httpd/myemail/errors/notfound.html
Another great feature
is the ability to create separate log files for your
Virtual hosts. Consider the following example:
#
point myemail.nu and www.myemail.nu to subdirectory
myemail
<VirtualHost myemail.nu www.myemail.nu>
ServerName www.myemail.nu
ServerAdmin myemail@myemail.nu
DocumentRoot /usr/local/etc/httpd/htdocs/myemail
TransferLog logs/myemail_access
ErrorLog logs/myemail_error
ScriptAlias /cgi-bin/
/usr/local/etc/httpd/htdocs/myemail/cgi-bin/
ErrorDocument 404 /errors/notfound.html
</VirtualHost>
This will allow you to
isolate the logs for a specific Virtual Host rather
than having them all lumped into the master log files.
[top]
Virtual Hosting and
E-mail Addresses
There are some
limitations to the e-mail capability of subhosts,
namely how the Virtual Server intreprets e-mail
addresses. For instance, if you send an e-mail to "john@abc.com"
and "john@xyz.com" the Virtual Server will
view these as the same address. This is because to the
Virtual Server, "john@abc.com" and "john@xyz.com"
both resolve to "john@192.41.5.2" because
both domain names resolve to the same IP address. BWSD
has however developed a way to get around this
limitation by using a proprietary utility titled "virtmaps".
You can find out more information about "virtmap"
setup in the BWSD Support Staff
Commonly
Asked Question Archive.
[top]
Related Articles
|