F.A.Q.'s
Virtual Hosting
Q: Can
I create custom error pages for my virtual hosts?
A: Yes. In order to create a custom error
page for your virtual host, you will have to manually edit the
~/www/conf/vhosts.conf file. Inside the Virtual Host entries for the specific
virtual host, add a line similar to the following:
ErrorDocument 404 /errors/notfound.html
You will then want to create the errors directory within the virtual host's Web
documents directory and place the correct HTML page in this directory.
Q:
What are the limitations
of Virtual Hosting?
A: There are a few limitations to Virtual
Hosting that you should be aware of before offering this service to your
clients:
If your Virtual Server begins to receive a large amount of traffic, you should
reduce the number of virtual hosts on the Virtual Server by either upgrading
heavily trafficked virtual hosts to their own Virtual Server or by moving some
virtual hosts to a less busy Virtual Server.
Virtual Hosting was made possible by the introduction of HTTP/1.1. In order to
view Virtual Hosts you must have a browser that is HTTP/1.1 compliant. Generally
speaking, most standard Web browsers support Virtual Hosts. Netscape Navigator
2.0+ and Microsoft’s Internet Explorer 3.0+ will view your Virtual Hosts fine.
Any other browser that is HTTP/1.1 compliant should also be able to access your
Virtual Hosts. If your clients are using an older browser that is not HTTP/1.1
compliant they will not be able to view their virtually hosted sites. However,
considering that together Netscape and MSIE have 90-95% of the market share,
this usually isn’t a problem. The small number of non-compliant Web browsers
will display your primary Web site regardless of which domain is requested.
Some search engines and “Web-crawler” spiders that do not support the HTTP/1.1
protocol will not be able to index your Virtual Hosts’ Web sites. Most major
search engines do not have this problem, but you should be aware that there are
some out there that do.
RSH Web Services can only install Digital Certificates for the principal domain
for the Virtual Server. Separate Digital Certificates cannot be created for
Virtual Hosts. Virtual Hosts can use SSL wildcard certificate for a small fee if
you request it.
Email aliases and account names are shared among all of the domains on a Virtual
Server. Because of this it is important to understand the use of virtual email
mappings (virtmaps)
Because there is only one administrative SSH (secure telnet) account per Virtual
Server, you cannot provide SSH access for your virtual hosts.
Q: How
can I browse my virtual hosts if the domain is not registered?
A: Sometimes you may have a virtual host’s
web pages set up before the domain’s registration has been completed. In this
case you can set up an alias in your ~/www/conf/vhosts.conf file to point at
your virtual host.
For instance, if your virtual host’s web pages are in ~/www/vhosts/domain.com/htdocs,
you can set up an alias like this:
Alias /domain /www/vhosts/domain.com/htdocs
You can place this line in the section for your main domain.
Then you can browse http://www.yourserver.com/domain.
Note: This FAQ only applies to Virtual Servers using the current directory
structure that is associated with the new BSDI4 configuration.
Q: With
the new BSDi vhost directory structure, I can no longer view my vhosts as a
subdirectory under my main domain. How can I look at my vhost’s website like I
used to be able to?
A: Since the new directory structure places
the vhost directory on the same level as the Virtual Server's htdocs directory,
the method of using "http://www.main-domain.com/vhost-domain/" to view the site
is no longer valid. Fortunately, there is a simple procedure that will allow the
above URL to work again.
The procedure involves adding a single line to the vhosts.conf file which is
located in the ~/www/conf directory on your Virtual Server. You simply need to
insert the following line to the Virtual Server's domain:
Alias /vhost-domain/
/usr/local/etc/httpd/vhosts/vhost-domain/htdocs/
Once you have made this modification, you can open your browser and go to the
following URL to display your vhost’s homepage:
http://www.main-domain.com/vhost-domain/
You can even add further subdirectories to the above URL.
This will only allow you to view your site and not to run any cgi scripts as the
path the to cgi-bin will be incorrect.
Virtual Server Lite |
Virtual Server Standard |
Virtual Server Pro |
Virtual Server Ultra |
400 megs |
1000 megs |
1500 megs |
6000 megs |
Details |
Details |
Details |
Details |
Order |
Order |
Order |
Order |
|