beautypg.com

Setting up web service for the first time, Step 1: set up the documents folder – Apple Mac OS X Server (Administrator’s Guide) User Manual

Page 341

background image

Web Service

341

MIME type mappings are divided into two subfields separated by a forward slash, such as
“text/plain.” Mac OS X Server includes a list of default MIME type mappings. You can edit
these and add others.

When you specify a MIME type as a response, the server identifies the type of data requested
and sends the response you specify. For example, if the browser requests a file with the suffix
“jpg,” and its associated MIME type mapping is “image/jpeg,” the server knows it needs to
send an image file and that its format is JPEG. The server doesn’t have to do anything except
serve the data requested.

Actions are handled differently. If you’ve mapped an action to a suffix, your server runs a
program or script, and the result is served to the requesting browser. For example, if a browser
requests a file with the suffix “cgi,” and its associated response is the action “cgi-script,” your
server will run the script and send the resulting data back to the requesting browser.

Setting Up Web Service for the First Time

Follow the steps below to set up Web service for the first time. If you need more information
to perform any of these tasks, see “Managing Web Service” on page 342 and “Managing Web
Sites” on page 349.

Step 1:

Set up the Documents folder

When your server software is installed, a folder named Documents is set up automatically.
Put any items you want to make available through a Web site in the Documents folder. You
can create folders within the Documents folder to organize the information. The folder is
located in this directory:

/Library/WebServer/Documents

In addition, each registered user has a Sites folder in the user’s own home directory. Any
graphics or HTML pages stored in the user’s Sites folder will be served from this URL:

server.example.com/~username/

Step 2:

Create a default page

Whenever users connect to your Web site, they see the default page. When you first install
the software, the file “index.html” in the Documents folder is the default page. You’ll need to
replace this file with the first page of your Web site and name it “index.html.” If you want to
call the file something else, make sure you change the default document name in the
General pane of the site settings window.

For more information about Web site settings, see “Managing Web Sites” on page 349.

This manual is related to the following products: