Software & Networking
Previous Page Contents Next Page
 NetForge 1.0 Manual:   Standard Situations 

This section shows how to model some situations which occur frequently when setting up a web server and concepts from other servers with a more traditional structure with NetForge's configuration system.


A Document Root

Many web servers have a main document root directory which is mounted at the root of the virtual server hierarchy. Special resources like CGI programs or Servlets are invoked by an appropriate handler.

NetForge does not have a document root. Instead all areas of the virtual hierarchy are served by their own Responders. In order to make all areas relative to a real base directory you can use a common Backend for all Frontends and set the Backend offset of each Frontend to its own area name. If you want to move the whole document tree to a different location, you only need to change the location in the Backend and not in all Frontends.

Form-Based File Uploads

The following steps are required to set up a responder for form-based file uploads:

  1. If you want to upload files into an access-protected area which is managed by a DirectFrontend you can activate the upload option of that Frontend to allow uploads with the same access restrictions. Otherwise create a new DirectFrontend which points to the Backend + offset where uploads should be allowed.
  2. If the DirectFrontend is not already protected by a BasicRealm and a Protection Space, you'll probably want to set these up to restrict uploading to authenticated users.
  3. Install a FormUploadResponder somewhere in the server's namespace (e.g. at "/upload"). Users can use this location to upload files to all DirectFrontends which allow uploads. Access to the FormUploadResponder does not need to be restricted. The access restrictions of the DirectFrontends also apply when uploading through a FormUploadResponder.
  4. If you want to customize the look of the upload form, save the automatically generated form to a file and put it at a different place in the server namespace. You have to edit the file and add an "ACTION=/upload" attribute (use the path where the FormUploadResponder is mounted) to the "<FORM>" tag.

Last modified Feb/17/1999 by Stefan Zeiger