Personal Web Server is pretty easy to configure. Even back in 1995 when it was all web based. However in this article I am looking at the PWS version which was shipped with Windows 98 and ME software.
The basic’s to it are very simply. In fact the only page of options we will be looking at is the advanced page. Open up your personal web server consol from the system tray and click advanced down the left hand side.
You should now be presented with a tree like view with the top root document and several sub folders. From here you can add virtual directories. Virtual directories are directories which aren’t really there but are instead linked to it.
For instance if you had two directories, your main website root C:\websites and a downloads directory which you wanted to be on your server at C:\downloads. Obviously you don’t want the move this folder into your other folder. And so you create a virtual directory so that http://localhost/downloads goes to C:\downloads rather than C:\websites\downloads.
Beware: Virtual directories override physical (normal) directories. So if you had both a virtual directory called downloads and a folder in your website root called downloads, the virtual directory would be used instead of the folder when using hyperlinks, etc.
In PWS you can create as many virtual directories as you like. Click add below the list of directories. You can also add virtual directories within virtual directories so you could set up http://localhost/downloads/games to go to C:\games rather than C:\downloads\games. To do this click on the downloads virtual directory before clicking new, rather than click the root directory and then clicking new.
You can change the properties of each of the directories including the root directory by clicking it and then click properties. Here you will probably be presented with a name for the directory (unless it is the root) as well as the file path to the directory.
You also have 3 tick boxes. Read which allows people to read the files in the server. You will almost always want to keep this ticked. The second one is script which allows the web server to run scripts. This is another one you will want to keep ticked.
The final one is write. This allows files such as text files and databases to have data added and removed this one. It’s a good idea to keep this one ticked if its your own server so you can run scripts such as ones that change database’s and is required if you want to alter any files.
There are also a few options on the main page of the advanced section at the bottom. One of these is “allow directory browsing.” This means that if a user goes to a folder, for example http://localhost, they will be presented with a list of the files and folders in the directory which they can click on.
Default document allows a file to be served as a kind of homepage when a user goes to a directory. For example if your default document file name was home.htm, when a user went to http://localhost, they would get home.htm if it existed.
The standards for default documents are default and index in which you should list several file formats. I use .asp .htm and .html though if you use other formats such as php and cfm you should list these too.
Conclusion
Personal Web Server has quite a few customisation options for each directory as well as the entire site and despite its problems with not being able to cope with high traffic or indeed anything above very little traffic, makes a great testing server especially for active server page developers.
Don't have time to check my blog? Get a weekly email with all the new posts. This is my personal blog, so obviously it is 100% spam free.
Tags: configuration, pws, web server
This entry was posted on Sunday, September 16th, 2007 at 1:51 pm and is filed under Life, Tech. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.