Scalable Hosting Solution Administration Guide
Scalable Hosting Solution (SHS) is an ISAPI filter application you can use to manage thousands of parked Web sites and virtual (sometimes referred to as "personal" or "vanity") Web sites with one server running Windows® 2000 Server and IIS.
For an overview of the Scalable Hosting Solution and a sample application, please see Scalable Hosting Solution Overview. For general and known issues information, see the SHS Readme.
Parked Sites Using the Sample Administrative Application Editing Site Templates Using the Sample Customer Administration Application Customizing the Administration Applications COM Object Specification Log File Processing
A parked site is a minimal Web page that identifies a registered domain and is currently inactive. Parked sites serve as placeholders for future active sites that have registered Internet domain names. With parked sites, customers cannot publish Web pages or create directories; however, they can:
Display one static page carrying a brief message, such as "This site is currently under construction."
Redirect requests to another page, such as the customer's personal home page.
Modify personal account details, such as email address and password.
The ISAPI filter installed with SHS is an example of how to rewrite URLs in an HTTP request to implement virtual sites with IIS. Virtual sites are Web sites that are created in sub-directories under a single root Web-directory. The ISAPI filter intercepts HTTP requests and maps requests for pages in a virtual site into a request for a page in the virtual site's subdirectory located under the root Web-directory. For example, given a virtual site's URL in the form
https://www.stoltzfusfamily.greatisp.com
or
https://www.stoltzfusfamily.com,
the URL is rewritten as
https://www.greatisp.com/stoltzfusfamily.
Virtual sites allow your customers to:
Upload, delete, modify, move, and host static pages (.HTML, .HTM).
Upload, delete, modify, move, and host graphics files (.JPEG, .JPG, .GIF).
Create, move, and delete folders within the allotted domain space.
Modify user information, such as email address and password.
Publish Web pages on the Internet.
View Web page hits.
SHS virtual sites only support static HTML page content and there is no support for Active Server Pages or Front Page Server Extensions.
Depending on the application, a single IIS 5.0 server can host up to 5,000 sites due to the amount of storage required in the metabase for each additional site. SHS however, is designed to support many more sites because all virtual site subdirectories share the same configuration of the root directory Web site. Therefore, with SHS, you can create and maintain tens to hundreds of thousands of parked and/or virtual sites. To provide rapid lookup of site configuration information, each site's settings are distributed in a set of configuration directories that parallel the multi-tier structure of site directories. However, the configuration data are only accessible through COM components, installed with SHS, providing secure access to site settings from the sample administration pages. For example, users are permitted to upload, modify and delete site content files but are prevented from accessing the site configuration.
SHS includes example administrative Web pages that you can customize to provision and administer your Web sites. Several COM components are provided that are used by the sample ISP administration and user administration ASP pages. You can also use these COM components for additional programs or scripts. Furthermore, you can integrate the ASP pages and COM components into existing administration applications or customize the sample to their own requirements, such as matching the application's look and feel to the rest of your site or integrating SHS with billing and provisioning systems. SHS contains the following components:
ISAPI Filter Written in C++, the ISAPI filter intercepts incoming HTTP requests and reformats the URL to a URL that is mapped to the site's subdirectory. This subdirectory lives under a single vroot. The ISAPI filter then sends the request back to IIS.
COM Components Written in Visual Basic, the COM components encapsulate commonly used SHS administrative tasks. The COM components are accessed through an interface by the sample administration ASP pages or through custom ASP pages or scripts written by the administrator.
Sample Administration Application Written in VBScript, the sample administration application is an ASP application that provides a fully functional example to use the SHS filter in an ISP scenario. The sample provisions new Web sites using a template-based approach to simplify site configuration. The user administration application allows users to upload and modify content on their site.
This application is provided to you 'as-is', with no support from Microsoft. The terms and conditions of using SHS are specified in the End-User-License-Agreement (EULA), which is displayed during installation and must be accepted by the user before using the application. Source code for the ISAPI filter, COM objects, and ASP pages is provided for this sample and may be used by customers to maintain and customize the application to their needs, as indicated in the EULA.
SHS includes administrative Web pages for Web site administrators to create and manage virtual Web sites, and to create Web site templates. Web site templates enable you to create different types of parked and virtual sites, depending on the template selected during site creation. Additionally, you can customize and create your own templates based on the settings you choose. The section "Editing Site Templates" provides instructions for editing and creating your own templates. The sample administration application allows you to:
Create Web sites.
Edit Web site properties.
View and edit administrative details for each site, such as user information.
Block/unblock access to Web sites.
Delete Web sites.
Change a Web site's template.
Edit valid domain extensions
Administrators gain access to the Web site management pages using the following procedure:
Request the URL: https://www.< ispname>.com/admin/admin.htm.
Authenticate through the administrative directory using NTLM and Basic Authentication.
To create a Web site:
On the SHS Admin screen, click Create Sites.
Click the option button to select the Web site template, and click Create.
Enter data for each field (all fields are mandatory) on the site screen, and click Submit.
On the return screen that notifies you that the site is up, click OK.
Important: The return screens for all but the virtual sites contain reminders that you must make DNS entries to activate new Web sites. Virtual sites are not virtual servers but pages that exist under host sites.
To edit Web site properties:
Click the Administer Sites menu item, type the name of the Web site, select the domain extension, and click Next.
Click Edit Site and fill in the text boxes for the changes you want to make.
Click Submit.
To block/unblock access to a Web site:
Click the Administer Sites menu item, type the name of the site, select the domain extension, and click Next.
Click Block Site. To remove blocked access click Unblock Site.
To delete a Web site:
Click the Administer Sites menu item, type the name of the site, select the domain extension, and click Next.
Click Delete Site. SHS returns a screen with the message "Site has been deleted."
To change a Web site's template:
Click the Administer Sites menu item, type the name of the site, select the domain extension, and click Next.
Click Change Template
From the drop-down menu, select the new site template.
Click Apply.
Editing valid domain extensions
You may wish to control which domain suffixes can be used in a site name. For example, a university granting sites to individual students may only allow domains ending with '.edu'. Using the Edit Domain Extensions screen, you can add or delete valid domain extensions as needed.
To add a domain name extension:
Click Edit Domain Extensions on the SHS menu.
Type the extension into the text box, including a leading dot. To add multiple extensions use a semicolon as the separator.
Click Save.
To delete a domain name extension:
Click Edit Domain Extensions on the SHS menu.
Delete the extension and separator from the list, and click Save.
You can view the default properties of the existing site templates, edit the default properties of the existing site templates, and create new site templates.
On the SHS Admin screen, click Edit Site Templates.
Click View Properties for the site template you want to view.
To return to the Edit Site Templates screen, click Back.
To edit Web site template properties:
On the SHS Admin screen, click on Edit Site Templates.
Click Edit Properties for the site template you want to edit.
Change properties settings as needed for User Publishing Rights, User Folder Creation Rights, Disk Quota, or Valid File Extensions.
Click Submit to finalize the change.
To create a new site template
On the SHS Admin screen, click Edit Site Template.
Under To create your own template, click Click Here.
Enter the Template Name, the Disk Quota, and the Valid File Extensions.
Click Yes or No for Stand Alone Domain, User Publishing Rights, and User Folder Creation Rights.
Click Save.
Log File Processing
IIS logs all the HTTP requests for each site in one W3C-formatted file. A reverse-logging filter translates the virtual site URL back to the original URL requested by the user. This allows the log file to record the requested URL, rather than the subdirectory the URL mapped into.
SHS includes Customer Administration pages that you can give to your customers "as-is," modify to suit your business plan, or replace entirely with pages that you design. Customers can use this sample to upload and modify content on their site. Customers gain access to their Web site management pages using the following procedure:
Request the URL: https://www..com/useradmin/administration.asp
Authenticate using the ASP login page that responds to the URL request.
Customers use the Login screen to login to sites they own and must have a valid username and password, which are submitted with the name of site. The Login screen allows users to change their own passwords. From the Login screen, customers can access three administration screens: Site Details, Files, and Logout.
Site Details Allows customers to view the details of their site and to edit their username and email alias.
Files Allows customers to view their existing folders and files; to create new folders and files; and to copy, move, delete, and rename existing folders and files.
Logout The Logout menu item logs the user out and returns a screen with the message "You have been logged out."
The procedures outlined in "To create a Web site" also apply to customers: The sample customer administration application and the sample administration application have the same user-interface to create Web sites.
After an administrator or user becomes authenticated, IIS generates a client-side cookie, named SHSUser. This cookie is used for the duration of the session to validate the user's requests against the actions permitted by the site's configuration template and expires when client's browser closes. SHSUser takes the following form: Time:SiteName:H(Time+Passwd) and has four keys: Time, SiteName, Secret, and UploadRight. SHSUser data is generated according to the following:
Response.cookies("SHSUser")("Time") = Time Response.cookies("SHSUser")("SiteName") = SiteName Response.cookies("SHSUser")("Secret") = H(Time+Passwd) Response.cookies("SHSUser")("UploadRight") = UploadRight
UploadRight is added to maintain session state and the links on the side frame of the Customer Administration page can be updated according to where the user is in the main frame.
SHS provides the following COM components for site administration:
SiteScaler
Template
Templates
Site
PostAcceptor
The SiteScaler object manages the creation, management, and deletion of SHS sites using site templates.
Properties:
Name |
Type |
Description |
---|---|---|
ConfigStoreLoc |
String |
Path of the site's configuration directory. |
PrinHostName |
String |
For vanity sites, this is the ISPs parent Web site name, obtained from the ServerComment property (e.g. www.greatisp.com). |
ValidDomainExt |
String |
List of valid domains permitted. |
Tag |
Variant |
User-defined property. |
Methods:
Initialize()
Description: Sets the properties of the SiteScaler object by reading information from the metabase.
**GetSite(**SiteName_In As String)
Description: Returns a reference to the site component for a given site name.
Return value: SiteObj_Out As Site
**SaveSite(**SiteObject_In As Site, NewSiteFlag_In As Boolean)
Description: Creates a new site or saves modifications to existing sites.
'NewSiteFlag_In = TRUE means we are creating new site
'NewSiteFlag_In = FALSE means we are saving changes to existing site
**DeleteSite(**SiteName_In As String)
Description: Deletes a site, given the site name.
EnumTemplates()
Description: Returns a collection of site configuration template objects.
Return value: TemplatesObject_Out As Templates
SaveTemplate(TemplateObject_In As Template, NewTemplateFlag_In As Boolean)
Description: Creates a new template or saves modifications to an existing template.
'NewTemplateFlag_In = TRUE means we are creating new template
'NewTemplateFlag_In = FALSE means we are saving changes to existing template
GetTemplate( TemplateName_In As String)
Description: Returns a template object, given its name.
Return value: TemplateObj_Out As Template
SaveDomainExt(ValidDomainExtList As String)
Description: Saves a domain extension (for example, .com, .org) to the list of valid domains.
Template Object
The Template object represents the customizable properties of a site configuration template.
Properties:
Name |
Type |
Description |
---|---|---|
TemplateName |
String |
The display name of the template |
StandAloneDomain |
Boolean |
A Boolean flag that determines whether or not a unique domain name may be used. |
UploadRight |
Boolean |
A Boolean flag that controls whether or not a user may upload new content files. |
FolderCreationRight |
Boolean |
A Boolean flag that controls whether or not a user may create subfolders in content directories. |
DiskQuota |
Integer |
The maximum allowed size of content files |
ValidFileExt |
String |
File extensions valid for uploading |
Tag |
String |
User-defined property |
Templates Object:
The Templates object is a collection of Template objects.
Site Object
The Site object stores the properties of a SHS Web site.
Properties:
Name |
Type |
Description |
---|---|---|
SiteName |
String |
The display name of the site. |
UserName |
String |
Name used to identify the site owner. |
Password |
String |
Password of the site owner. |
String |
Email address of the site owner. |
|
TemplateName |
String |
Name of a template used to create of manage sites. |
VdirPath |
String |
The path to the content files of a site. |
ConfigStoreLocation |
String |
The path to the configuration files of a site. |
DateCreated |
String |
The date the site was created. |
PresentSiteSize |
Integer |
Current site disk usage. |
SiteBlocked |
Boolean |
A Boolean flag that controls whether the site is blocked from access by the owner or from access by Web clients. |
RedirectUrl |
String |
A URL to which clients are redirected. (Optional) |
ParkedMessage |
String |
A message displayed on the site's default content page that states the site will be active in the future or is not presently active. |
Tag |
String |
User-defined property. |
Methods:
BlockSite()
Description: Sets the SiteBlocked property to prevent Web clients from gaining access to content of the site.
UnblockSite()
Description: Unblocks access to the contents of a site
**GetPhysicalPath(**SiteName_In As String)
Description: Returns the physical path of the content directory for the site (for example, C:\sharedsites\content\r\o\b\Roberta\)
Return value: ActualPhysicalPath_Out As String
UserAuth Object
The UserAuth object authenticates the owner of the site against the user name and password stored in the site's configuration file.
Methods:
CheckPasswd(UserName_In As String, SiteName_In As String, Password_In As String,
CurTime_In As Time )
Description: If Passwd is verified, this method returns the Secret key of the cookie. Otherwise, it returns an empty string
Return value: SecretKey_Out As String
CheckCookie takes the three keys of the cookie and verifies that the Secret key of the cookie is consistent with the Time and SiteName.
CheckCookie(CookieTime_In As Time, SiteName_In As String, Secret_In As String )
Description: Tests whether the cookie is valid
Return value: CookieValid_Out As Boolean
Note: In the methods described above, Time is represented as Time+Date (i.e. Time = 8/4/2000 3:00 pm).
PostAcceptor Object
The PostAcceptor object handles file upload requests. Web clients script ASP pages using PostAcceptor to upload and manage content for the site. PostAcceptor transfers the file from the user's PC to the content directory specified.
Methods:
DoUpload(RequestObj As Variant)
Description: Uploads a new file to the site
Return Value: Boolean value indicating whether the upload was successful
getDestPath( ) As String
Description: Returns the destination path
getError( ) As String
Description: Returns an error message, if any, from the upload
getExt( ) As String
Description: Returns the file extension
getFileName( ) As String
Description: Returns the file name
getSize( ) As String
Description: Returns the file size
IIS logs all requests from each site in one W3C-formatted file. An ISAPI filter will reverse-translate from mapped addresses to the addresses originally requested by the users and store this original address in the log file.