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/httpd.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:
Your Virtual Server (150 - 400 meg) is designed to handle a small to medium hit load (under
30,000 hits a day). This includes all of the Web sites hosted on your Virtual
Server – not just your primary one. If a Virtual Server begins to receive
over 30,000 hits per day, the quality of your Web service will begin to be
affected.
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. To ensure the best possible
performance for your Virtual Server, we recommend that you limit the Virtual
Server 150 meg to 10 Virtual Hosts, and the Virtual Server 300 meg to 20
Virtual Hosts. These limits will help manage load balancing efforts on your
Virtual Server and ensure that your Virtual Server runs as efficiently as
possible.
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 with a safe server 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 Telnet account per Virtual Server,
you cannot provide Telnet 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/httpd.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: Why
do the virtual host domains that I removed from my main Virtual Server
still show up in the VAdmin Web Interface?
A: When you used the "vaddvhost"
command to add a new domain to your main Virtual Server as a virtual host, the
following files get modified and the appropriate entries for the new virtual
host are added to:
~/www/conf/httpd.conf
~/etc/sendmail.cw
Thus, when you remove a virtual host domain from your main Virtual Server, you
must edit the 2 files above to remove all the entries associated with the
virtual host domain.
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 httpd.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.