By far, the easiest way to set up your own
web content on Windows Home Server is to add that content to the
existing default website. This requires no reconfiguration of the
server, of IIS, of the Windows Home Server firewall, of the client
computers, or of the router. You simply add the content, and it’s ready
for browsing.
Adding a File to a Default Website Folder
If you have just a few web content files that you
want to add to the Windows Home Server website, you can add them
directly to the IIS folders. First, create your web content file (HTML,
ASP, or whatever). Here’s a sample HTML file—which I’ve named HelloWorld.htm—that I’ll use as an example:
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<p>
<font style="size: 20pt; font-family: Verdana; color:DarkBlue">
Hello Windows Home Server World!
<font>
</p>
</body>
</html>
Tip
Don’t use spaces in the names of files (or folders)
that you add to any IIS website. Although Internet Explorer might
display such resources successfully, other browsers might not.
Next, save the file to one of Windows Home Server’s default website folders:
Site | Add
your web content to this folder to view the content without having to
log on to Windows Home Server. To browse to the content, use Internet
Explorer to navigate to http://server/content, where server is the Windows Home Server name and content is the name of the web content file. |
RemoteAccess | Add
your web content to this folder if you want users to have to log on to
Windows Home Server before they can view the content. To browse to the
content, use Internet Explorer to first navigate to https://server/remote/server is the Windows Home Server name), log on to Windows Home Server, and then navigate to https://server/remote/content (where content is the name of the web content file). (where |
Caution
If your web content file references other files—for example, an HTML file that uses the <img> tag to reference an image file—be sure to copy those files to the homeremote
folder (whichever folder you’re using for the main file). You can
either put the files in the root, or you can store them in a subfolder.
For example, you might want to store image files in the Resources
subfolder. If you store the files in subfolders, make sure you adjust
the path in your code, as required. For example, if you place a file
named HelloWorld.jpg in the Resources subfolder, you need to add the subfolder to the <img> tag, like so: or
<img src="/Resources/HelloWorld.jpg" />
Figure 1 shows the HelloWorld.htm file copied to the home folder, and Figure 2 shows the file displayed with Internet Explorer.
Adding a Folder to the Default Website
To add a folder to the Windows Home Server default website, you have two choices:
- Add the folder manually.
- Use the Virtual Directory Creation Wizard in the IIS Manager.
The next two sections provide the details.
Adding a Folder Manually
Adding a folder to the Windows Home Server default
website is not all that different from adding a file. That is, you can
create a new subfolder within the Site or RemoteAccess folder, or you can copy or move an existing folder and paste it within Site or RemoteAccess.
To access web content within the new folder, tack the folder name and
filename to the default website address. For example, if you create a
subfolder named photos within the Site folder, and the main page is named photos.htm, you access the content by entering the following address into the browser:
http://server/photos/photos.htm
Note that you can save some wear and tear on your
typing fingers by changing the name of the main content file to one of
the following:
default.htm
default.asp
index.htm
index.html
default.aspx
When
you use one of these names, IIS displays the file by default if you
don’t specify a filename as part of the URL. For example, if you rename
the photos.htm file to default.htm, you can access the file just by specifying the folder path in the URL:
http://server/photos/
Adding a Folder Using the Virtual Directory Creation Wizard
When you add a folder manually, IIS Manager detects
the new folder and adds it to the folder content. However, you can also
use IIS Manager to create a new folder with the default website. Here
are the steps to follow:
1. | In IIS Manager, open the SERVER, Sites, Default Web Site branch (where SERVER is the name of your Windows Home Server PC).
|
2. | If you want to create a subfolder within the Remote folder, click Remote.
|
3. | In the Actions pane, click View Virtual Directories. IIS Manager displays the Virtual Directories page.
|
4. | In the Actions pane, click Add Virtual Directory. IIS Manager displays the Add Virtual Directory dialog box.
|
5. | Use
the Alias text box to type an alias for the folder. The alias is the
name that appears in IIS Manager, within either the root branch or the
Remote branch. Note that this is not the same (nor does it have to be the same) as the name of the directory.
|
6. | Use the Physical Path text box to specify the location of the folder. You have three choices:
If the folder exists and you know the full pathname (drive and folders), type it in the Physical Path text box. If
the folder exists and you’re not sure of the full pathname (or it’s too
long to type), click Browse, use the Browse for Folder dialog box to
select the folder, and then click OK. If
the folder doesn’t exist, click Browse, use the Browse for Folder
dialog box to select the folder within which you want the new folder to
appear, click Make New Folder, type the folder name, press Enter, and
then click OK.
|
7. | Click OK.
|