Java Web Server 2.0  

Changing the Document Root


Documentation Contents / Documentation Index / Glossary / Administration Tool Help

The document root is the directory from which the Java Web Server serves webpages requested by client browsers. By default that directory is:

server_root/public_html
where server_root is the location of the installed Java Web Server.

Changing the document root can be easily done through the Administration Tool. However, there are security implications if there are protected files in your document root. For an explanation of the security issues and solutions when moving your document root, see Maintaining Security When Changing the Document Root section of this document.

If you have no protected files in your document root, simply use the Site Setup panel of the Administration Tool to make the change. For an explanation of that panel, see the Administration Tool: Site Setup online document.

Maintaining Security When Changing the Document Root

In some cases, changes made to the Java Web Server are not dynamic and do not take affect until the server is restarted. For example, if you have protected files in your document root directory and you create a new document root and move them there, you will lose authentication on them until you restart the server. If you change your document root and move protected files to it, you must restart the server as follows:

  1. Open the Administration Tool.
  2. Select Web Service.
  3. Select Stop.
  4. Select Restart.

Top
java-server-feedback@java.sun.com
Copyright © 1999 Sun Microsystems, Inc.
All Rights Reserved.