Sun Java System Web Server 6.1 SP12 Administrator's Guide

Setting the Primary Document Directory

The primary document directory (also called the document root) is the central directory where you store all the files you want to make available to remote clients.

When you add a class, specify a document directory with an absolute path. If you do not use a variable as part of that path, the document root for every virtual server in the class will default to the same directory. You can then change them individually in the Class Manager.

Another approach is to use a variable when you set the path for the class. For example, you can use the $id variable to create a directory named with the virtual server id for every virtual server in the class. You can set the class’ document root to be class_doc_root/$id. Using this path, if your class’ document directory is /sun/servers/docs/$id, the default document directory for a virtual server vs1 that belongs to the class is /sun/servers/docs/vs1.

For more information about the document directory and how it is used at the server instance, class, and virtual server level, see Document Root.

To change the primary document directory to use a different path or variable, perform the following steps.

ProcedureTo change the primary document directory

  1. From the Class Manager, click the Content Management tab.

  2. Click Primary Document Directory.

  3. Enter an absolute directory path or a variable, or a path and variable combination next to the virtual server.

    If you include the variable $id at the end of your document root absolute path, every virtual server by default, will have a default document root of class_doc_root/virtual_server_ID. For example, if your class’ document directory is /sun/servers/docs/$id, the default document directory for a virtual server vs1 that belongs to the class is /sun/servers/docs/vs1.

    For more information about variables, see Using Variables.

  4. Click OK.

    For more information, see the online help for the Primary Document Directory page.


    Note –

    Typically, each virtual server has its own primary document directory.