Editing MIME Types


Multipurpose Internet Mail Extension (MIME) is a standard protocol for defining how a user's Web browser handles files shared from a Web server. Typically, every file on your Web server has a file-type suffix appended to the end of the filename. MIME types define a specific action for a user's Web browser to take when it encounters a certain file-type suffix. Some examples of file-type suffixes configured with MIME types include .htm or .html for hypertext, .jpg or .jpeg for a picture file, and .qt or .mov for a QuickTime video file.

Mac OS X Server's Web server comes with a preconfigured list of standard MIME types. However, you may need to edit or add to your server's MIME types list.

To edit MIME types:

1.

Launch the Server Admin tool located in /Applications/Server, and authenticate as the administrator (Figure 9.65).

Figure 9.65. Launch the Server Admin tool, and authenticate.


2.

Select the Web service for your server in the Computers & Services list (Figure 9.66).

Figure 9.66. The Web service is selected in the Computers & Services list.


3.

Click the Settings button and then the MIME Types tab .

The MIME Types pane displays your Web server's lists of MIME types and content handlers (Figure 9.67).

Figure 9.67. The MIME Types frame lets you edit the Web server's lists of MIME types and content handlers.


4.

Do one of the following:

  • Double-click the MIME type or suffix to edit it directly (Figure 9.68).

    Figure 9.68. Double-click to edit a MIME type.


  • Select a MIME type from the list, and then click the Edit button ; an edit dialog drops from the title bar (Figure 9.69). To edit the Suffixes list in this dialog, click the Add or Delete icon . When you've finished making changes, click the OK button .

    Figure 9.69. You can also edit a MIME type in this edit dialog.


5.

Verify your changes by checking the MIME Types list again.

6.

When you've finished making changes, click the Save button .

If you aren't prompted by Server Admin, you may need to restart your server after making these changes.

Tips

  • It's important to remember that MIME type settings will affect every Web site on your server.

  • The Server Admin tool should automatically restart the Web service when you click the Save button .


Editing content handlers

Content handlers are Java programs that define the Web server's response to file requests based on the file-type suffix. Typically, every file on your Web server has a file-type suffix appended to the end of the filename. Some examples of file-type suffixes configured with content handlers include as is, which sends the item as it's requested; bin, which transfers the file as a Mac Binary file; and cgi, which executes the file as a CGI script.

Mac OS X Server's Web server comes with a preconfigured list of standard content handlers. However, you may find it necessary to edit or add to your server's content handlers list.

To edit content handlers:

1.

Launch the Server Admin tool located in /Applications/Server, and authenticate as the administrator (Figure 9.70).

Figure 9.70. Launch the Server Admin tool, and authenticate.


2.

Select the Web service for your server in the Computers & Services list (Figure 9.71).

Figure 9.71. The Web service is selected in the Computers & Services list.


3.

Click the Settings button and then the MIME Types tab .

The MIME Types pane displays your Web server's lists of MIME types and content handlers (Figure 9.72).

Figure 9.72. The MIME Types frame lets you edit the Web server's lists of MIME types and content handlers.


4.

To edit a content handler, do one of the following:

  • Double-click the content handler or suffix to edit it directly (Figure 9.73).

    Figure 9.73. Double-click to edit a content handler.


  • Select a content handler from the list, and then click the Edit button ; an edit dialog drops from the title bar (Figure 9.74). To edit the Suffixes list in this dialog, click the Add or Delete icon . When you've finished making changes, click the OK button .

    Figure 9.74. You can also edit a content handler in this edit dialog.


5.

Verify your changes by checking the Content Handlers list again.

6.

When you've finished making changes, click the Save button .

If you aren't prompted by Server Admin, you may need to restart your server after making these changes.

Tips

  • It's important to remember that content handler settings will affect every Web site on your server.

  • The Server Admin tool should automatically restart the Web service when you click the Save button .




    Mac OS X 10. 3 Server Panther. Visual QuickPro Guide
    Mac OS X Server 10.3 Panther: Visual QuickPro Guide
    ISBN: 0321242521
    EAN: 2147483647
    Year: 2004
    Pages: 105

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net