It is important to consider some of the security issues that relate to virtual subhosting. Because the Virtual Hosts operate in the same Virtual Server Environment, CGI scripts that are executed by any Virtual Host will inherit privileges to access any directory or file in your Virtual Server directory hierarchy.
For example, a malicious Virtual Hosted client could write a simple script to remove all of the files on your Virtual Server (not a "good thing"). Another script could send the contents of your "~/etc/passwd" file to a remote e-mail address where "weak" passwords could be decrypted. If your login password is susceptible to a dictionary crack, a subhosted client could effectively steal shell access away from you.
It is recommended that you do not offer full cgi-bin access to your Virtual Hosted clients unless you have complete trust in them (even then, they may accidently cause damage to your Virtual Server). We recommend one of the following alternatives:
<VirtualHost> definition:
ScriptAlias /cgi-bin/
/usr/local/etc/httpd/cgi-bin/vhlib/
ScriptAlias /cgi-bin/
/usr/local/etc/httpd/cgi-bin/HOSTNAME/ Where the subdirectory HOSTNAME becomes the cgi-bin directory for the subhosted client (you may want to use the same directory name for both the htdocs and cgi-bin subdirectories).
We recognize that in most cases it is likely that not only are you providing your clients with hosting service, but you are also designing their web content and writing their CGI scripts as well. So this discussion may not be applicable to your specific situation, but it is still an element to remember should you decide to expand the scope of your services in the future.
Copyright © 1996-2000, Last Modified: 21 January 2000A Little Technology Shoppe, LLC (ALTS.NET)®. All rights reserved. All brand names and product names used on these web pages are trademarks, or trade names of their respective holders.