Mac OS X Server Web Technologies Administration For Version 10.
K Apple Inc. © 2007 Apple Inc. All rights reserved. The owner or authorized user of a valid copy of Mac OS X Server software might reproduce this publication for the purpose of learning to use such software. No part of this publication might be reproduced or transmitted for commercial purposes, such as selling copies of this publication or for providing paid-for support services. Every effort has been made to guarantee that the information in this manual is correct. Apple Inc.
1 Contents Preface 9 9 9 10 10 11 12 12 13 13 About This Guide What’s New in Version 10.
Chapter 2 23 23 24 24 24 25 27 28 29 29 30 30 31 31 31 32 32 33 33 Working with Web Service Setup Overview Turning Web Service On Setting Up Web Service Configuring General Settings Configuring MIME Types Settings Configuring Proxy Settings Configuring Modules Settings Configuring Web Services Settings Starting Web Service Managing Web Service Checking Web Service Status Viewing Web Service Logs Viewing Web Graphs Stopping Web Service Performance Tuning Setting Simultaneous Connections for the Web Serv
Chapter 4 54 54 55 55 56 56 57 57 57 58 58 59 Using WebDAV to Manage Website Content Enabling WebDAV on Websites Using WebDAV to Share Files Configuring Web Content File and Folder Permissions Managing Multiple Sites on One Server Using Aliases to Have a Site Respond to Multiple Names Websites and Multiple Network Interfaces User Content on Websites Web Service Configuration Default Content Accessing Web Content Securing Web Content on Case Insensitive File Systems 61 61 62 62 62 63 64 64 65 65 66 66 66
73 73 74 74 75 75 75 76 Creating Timed Calendar Events Editing Calendar Events Deleting Web Calendar Events Using the Web Calendar with iCal Setting Up User and Group Blogs Enabling Blog Service for a Website Adding a Blog Page Setting Blog SACL Permissions for Users Chapter 5 77 77 77 78 78 78 79 80 Configuring and Managing Webmail Webmail Overview Webmail User Services Webmail and Your Mail Server Webmail Protocols Enabling Webmail Configuring Webmail Setting Up Mailing List Web Archives Chapter 6
94 95 Working with Ruby on Rails Managing the Deployment of Ruby on Rails Applications Chapter 7 99 99 99 100 100 101 101 102 102 102 102 102 103 103 103 103 103 103 103 103 104 104 104 Managing Web Modules Apache Web Module Overview Working with Web Modules Viewing Web Modules Adding Web Modules Enabling Web Modules Changing Web Modules Deleting Web Modules Macintosh-Specific Modules mod_macbinary_apple mod_spotlight_apple mod_auth_apple mod_hfs_apple mod_digest_apple mod_auth_digest_apple mod_spnego m
Contents
Preface About This Guide This guide tells you how to set up and manage a web server, websites, and use open source web technologies. Mac OS X Server version 10.5 includes Web service that is comprised of multiple web technologies. Web service comes preinstalled on Apple server hardware and offers an integrated, flexible environment for establishing and managing web technologies. What’s New in Version 10.5 Mac OS X Server v10.5 offers the following enhancements to Web service: Â New and improved Apache 2.
 Chapter 6, “Working with WebObjects and Open Source Applications,” provides information and instructions related to WebObjects and open source components Apache, Tomcat, and MySQL.  Chapter 7, “Managing Web Modules,” describes the modules included in Mac OS X Server and explains how to install, enable, and view modules.  Chapter 8, “Solving Web Service Problems,” helps you address issues with web technologies and websites. In addition, the Glossary defines terms you’ll encounter as you read this guide.
Help Viewer automatically retrieves and caches the most recent server help topics from the Internet. When not connected to the Internet, Help Viewer displays cached help topics. Mac OS X Server Administration Guides Getting Started covers installation and setup for standard and workgroup configurations of Mac OS X Server. For advanced configurations, Server Administration covers planning, installation, setup, and general server administration.
This guide... tells you how to: System Imaging and Software Update Administration Use NetBoot, NetInstall, and Software Update to automate the management of operating system and other software used by client computers. Upgrading and Migrating Use data and service settings from an earlier version of Mac OS X Server or Windows NT. User Management Create and manage user accounts, groups, and computers. Set up managed preferences for Mac OS X clients.
Getting Documentation Updates Periodically, Apple posts revised help pages and new editions of guides. Some revised help pages update the latest editions of the guides. Â To view new onscreen help topics for a server application, make sure your server or administrator computer is connected to the Internet and click “Latest help topics” or “Staying current” in the main help page for the application. Â To download the latest guides in PDF format, go to the Mac OS X Server documentation website: www.apple.
Preface About This Guide
1 Web Technologies Overview 1 This chapter helps you to become familiar with web technologies and to understand the major components before setting up your services and sites. The Web service is a complex suite of tools for the configuration and management of the Apache web server, development of websites, and the integration of an application server with a number of open-source components. It is best to familiarize yourself with the complexities of your system before proceeding.
      Apache Web Server WebDAV CGI Support SSL Support Dynamic Content with Server Side Includes (SSI) Blogs and RSS Support Apache Web Server Apache is an open source HTTP web server that administrators configure using Server Admin. Apache has a modular design, and the set of modules enabled by default is adequate for most uses. Server Admin controls a few optional modules. Experienced Apache users can add or remove modules and change the server code.
SSL Support Web service includes support for Secure Sockets Layer (SSL), a protocol that encrypts information being transferred between client and server. SSL works with a digital certificate that provides a certified identity for the server by establishing a secure, encrypted exchange of information. Dynamic Content with Server Side Includes (SSI) Server Side Includes (SSI) provide a method for using the same content on multiple pages in a site.
Providing Secure Transactions If you want to provide secure transactions on your server, you must set up SSL protection. SSL lets you send encrypted, authenticated information across the Internet. For example, if you want to authorize credit card transactions through your website, you can use SSL to protect the information that’s passed to and from your site. Important: You can’t use the performance cache for a website if SSL is enabled for that site.
Understanding WebDAV If you use WebDAV to provide live authoring on your website, you must create realms and set access privileges for users. Each site you host can be divided into a number of realms, each with its own set of users and groups that have browsing or authoring privileges. Setting WebDAV Privileges The Apache process running on the server must have access to the website’s files and folders.
Defining Realms When you define a realm, which is typically a folder (or file system), the access privileges you set for the realm apply to all contents of that folder. If a new realm is defined for a folder in the existing realm, only the new realm privileges apply to that folder and its contents. For information about creating realms and setting access privileges, see “Using Realms to Control Access” on page 40.
Note: Do not add or change MIME suffixes by editing configuration files. Web Server Responses (Content Handlers) When a file is requested, the web server handles the file using the response specified for the file’s suffix. Responses, also known as content handlers, can be either an action or a MIME type.
Chapter 1 Web Technologies Overview
2 Working with Web Service 2 This chapter shows you how to use Server Admin to set up Web service and to manage web settings and components. Mac OS X Server combines the latest open source and standards-based Internet services in a complete, easy-to-use web hosting solution. Use Server Admin to configure Web service and set up web components depending on your organization’s needs. Setup Overview Here is an overview of the basic steps for setting up Web service.
Step 7: Configure web services Use web service settings to set up common settings shared between wikis, blogs, web calendars, and web based mailing list archives for groups. See “Configuring Web Services Settings” on page 29. Step 8: Start Web service After you configure Web service, start the service to make it available. See “Starting Web Service” on page 29. Turning Web Service On Before you can configure Web settings, you must turn on web service in Server Admin.
2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 Click Settings, then click General. 5 Enter the maximum simultaneous connections. The default setting is 1024 connections. This is the number of concurrent connections that are allowed to access your web server. 6 Enter the time in seconds for the connection timeout. The default setting is 300 seconds. This is the length of time before a connection to your web server times out.
The server includes the MIME type in its response to a browser to describe the information being sent. The browser can then use its list of MIME preferences to determine how to handle the information. The server’s default MIME type is text/html, which specifies that a file contains HTML text. The web server is set up to handle the most common MIME types and content handlers. You can add, edit, or delete MIME type and content handler mappings.
7 Click Save. Configuring Proxy Settings You use the Proxy settings pane in Web service to configure a forward proxy. A forward proxy is located between the web server and client browsers and passes requests for information between clients and server. The client must be configured to use the forward proxy to access other sites. A forward proxy is commonly used to provide Internet access to internal client computers that are restricted by a firewall.
6 Select the Control Access To Proxy checkbox to limit access and then enter the domain name that is permitted access in the “Allowed Domain” field. Generally, when limiting who can use your web server as a proxy, limit access to a specific domain. Users in that domain obtain access. 7 In the Cache Folder field, enter the pathname for the cache folder. You can also click the Browse button and browse for the folder you want to use.
Configuring Web Services Settings You use the Web Services settings pane in Web service to configure common web server settings that are hosted on any site. Web services include wikis, blogs, web calendars, and web-based mailing list archives for groups. These services are independently enabled for each website you host. To configure Web service settings for your server: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears.
The service runs until you stop it and restarts if your server is restarted. From the Command Line You can also start Web service using the serveradmin command in Terminal. For more information, see the Web service chapter of Command-Line Administration. Managing Web Service This section describes typical day-to-day tasks you might perform after you set up Web service on your server. Initial setup information appears in “Setting Up Web Service” on page 24.
Viewing Web Service Logs Use Server Admin to view the error and access logs for Web service, if you have enabled them. Web service in Mac OS X Server uses the standard Apache log format, so you can also use a third-party log analysis tool to interpret the log data. To view logs: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web.
3 From the expanded Servers list, select Web. 4 Click Stop Web (below the Servers list). From the Command Line You can also stop Web service immediately using the serveradmin command in Terminal. For more information, see the Web services chapter of Command-Line Administration. Performance Tuning You can limit the period of time that users are connected to the server. You can also specify the number of connections to websites on the server at one time.
For maximum spare servers, if more than the maximum number of spare servers are idle, the server stops adding spare servers beyond the maximum limit. For minimum spare servers, if there are fewer than the minimum spare servers required, the server adds spare servers at a rate of one per second. 8 Enter the number of servers to start. This is the number of spare servers that get created at startup. 9 Click Save.
To set the connection timeout interval: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 Click Settings, then click General. 5 In the “Persistent connection timeout” field, enter a number to specify the amount of time that can pass between requests before the session is disconnected by the web server. The range for connection timeout is 0 to 9999 seconds. 6 Click Save.
3 Creating and Managing Websites 3 This chapter helps you create and manage websites that are hosted on your web server. With Web service configured and your web server running, you can create websites. You create and modify websites on your server with Server Admin. Creating a website establishes the framework that you use to provide web hosted content in various formats. Website Setup Overview Here is an overview of the basic steps for setting up a website.
Step 3: Assign privileges for your website The Apache processes that serve webpages must have Read access to the files and Read/Execute access to the folders. (In the case of folders, Execute access means the ability to read the names of files and folders contained in that folder.) Those Apache processes run as user www—a special user created for Apache when Mac OS X Server is installed.
Step 7: (Optional) Creating realms to control website access You can create a realm to control access to locations or folders in a website. Use the Sites Realms pane to configure your website realms. For details, see “Using Realms to Control Access” on page 40. Step 8: Enable website access and error logs Use the Logging pane in the Sites pane to enable access and error logs for your website. For details, see “Enabling Access and Error Logs for a Website” on page 42.
2 Replace the index.html file with the main page for your website. Make sure the name of your main page matches the default document name you set in the Sites General pane. For details, see “Setting the Default Webpage” on page 39. 3 Copy files you want available on your website to the web folder. Creating a Website Use Server Admin to create a website framework. This allows content from the web folder to be hosted by your web server.
10 Click Save. Setting the Default Webpage The default page appears when a user connects to your website by specifying a folder or host name instead of a file name. You can have more than one default page (known as a default index file in Server Admin) for a website. If multiple index files are listed for a website, the web server uses the first one listed in the web folder for that website. To set the default webpage: 1 Open Server Admin and connect to the server.
Folder Listing: Displays a list of folders when users specify the URL and no default webpage (such as index.html) is present. Instead of viewing a default webpage, the server shows a list of the web folder’s contents. Folder listings appear only if no default document is found. WebDAV: Turns Web-based Distributed Authoring and Versioning (WebDAV) on, which allows users to make changes to websites while the sites are running.
To use a realm to control website access: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 Click Sites, then select the website in the list. 5 Click Realms below the websites list. 6 Click the Add (+) button to create a realm. The realm is the part of the website users can access. 7 In the Realm Name field, enter the realm name.
Browse and Read WebDAV: Permits users or groups to browse the website and also read the website files using WebDAV. Browse and Read/Write WebDAV: Permits users or groups to browse the website and also read and write to website files using WebDAV. None: Prevents users or groups from using any permissions. 14 Click Save. Use the Realms pane to delete a user or group by selecting the name and clicking the Delete (–) button.
8 In the Location field, enter the path to the folder where you want to store access logs. If you are working with multiple websites, you can name separate logs for each website. You might want to include the site domain name in the log name for easy recognition when reviewing logs. If you have only two websites, you might want to use a single log (with the default name the server uses). You can also click the Browse button to locate the folder you want to use.
When SSL is implemented on a server, a browser connects to it using the https prefix in the URL, rather than http. The “s” indicates that the server is secure. When a browser initiates a connection to an SSL-protected server, it connects to a specific port (443) and sends a message that describes the encryption ciphers it recognizes.
10 Confirm that you want to restart Web service. Server Admin lets you enable SSL with or without saving the SSL passphrase. If you did not save the passphrase with the SSL certificate data, the server prompts you for the passphrase upon restart but won’t accept manually entered passphrases. Use the Security pane for the site in Server Admin to save the passphrase with the SSL certificate data. For more information, see “Using a Passphrase with SSL Certificates” on page 53.
The examples below show aliases and redirects. Type Pattern Path Description Alias /images /Volumes/Data/imgs If you make a file system change but don’t want to update all image URLs in your HTML files, this instructs www.example.com/images/boat.jpg to take the file from /Volumes/Data/imgs/ boat.jpg. Alias Match ^/(.*)\.gif /Library/WebServer/ Documents/ gifs$1.jpg If you store all gifs in a specific folder but they must be referenced from the web server root, this instructs the alias www.
Redirect: Maps a URL term to redirect to another server. Redirect Match: Maps a regular expression pattern for a path to redirect to another server. 10 In the Pattern field, enter the pattern for the alias or redirect. This is the pattern input from the incoming URL. 11 In the Path field, enter the path for the alias or redirect and click OK. This is the path in the file system or the redirect that gets sent back to the requester. 12 Click Save.
A sticky session identifier is used to bind a user that is browsing your site to the server that the session started on. This keeps users that are browsing a website that is supported by multiple web servers connected to the server that they started with. 9 To add balancer members, click the Add (+) button below the Balancer Members list; enter a Server URL (worker URL) and define its route and load factor, then click OK.
For details, see “Setting Up a Web Calendar” on page 72. 10 Select the Mailing list web archive checkbox if you want mailing list functionality on your website. A mailing list is a discussion group that uses mass mail to facilitate communication. For details, see “Setting Up Mailing List Web Archives” on page 80. 11 Click the Add (+) button below the Users/Group list to add users and groups that will create wikis on your site.
 The DNS name and IP address for a site  The port being used for the site To view website settings: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 Click Sites, then select the website in the list. You can view or change the settings for a site by selecting the site in the Sites pane list and clicking a setting pane.
Note: If you turn SSL on for a site, the port for that site is changed to 443. If you turn SSL off, the port changes to 80, regardless of what it was previously. A message on the screen alerts you to the port change when you turn off SSL. To set the port for a website: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 Click Sites, then select the website in the list.
Note: Disabling CGIs for a site does not disable CGIs in the CGI-Executables folder. Enabling Server Side Includes (SSI) Enabling Server Side Includes (SSI) permits a block of HTML code or other information to be shared by different webpages on your site. SSIs can also function like CGIs and carry out commands or scripts on the server. To enable SSI in Server Admin: 1 In Server Admin, click Web in the list for the server you want. 2 Click Sites in the button bar.
An example URL is httpd://vhost1.example.com/.spotlight. This presents a simple search page that searches the contents of DocumentRoot for the website. Results are sorted with the most relevant hits first, although no relevance score is presented. Monitoring Website Activity Use website logs to monitor your website activity and server events. You can configure logs to record events as messages for specific website activity.
$ sudo serveradmin start web 3 When prompted, enter the certificate passphrase. Using WebDAV to Manage Website Content WebDAV lets you or your users make changes to websites while the sites are running. With WebDAV, users or groups can collaboratively manage website files and folders. For more information on how WebDAV works, see “Understanding WebDAV” on page 19.
Using WebDAV to Share Files You can use WebDAV to permit authorized users to connect to a website and to share files on that site. The steps below provide a brief example of setting up and sharing files using WebDAV. Â Turn on WebDAV for the site in Server Admin. See “Enabling WebDAV on Websites” on page 54. Â Set up realms for the site in Server Admin to control access to the site. See “Using Realms to Control Access” on page 40.
 Web content files and folders are owned by user Root and Group Admin by default, so they are modifiable by an administrator but not by user or group www.  To use WebDAV, web content files must be readable and writable by user or group www, and folders must be readable, writable, and executable by user or group www.  If you need to change web content files and folders while you are logged in as an administrator, those files or folders must be modifiable by the administrator.
To set up a website this way, use the primary name as the site name in Server Admin (by clicking the site and entering the primary name in the General pane for the site, then adding the other names in the Aliases pane for that site). For the procedure, see “Managing Access to Sites Using Aliases” on page 45. For example, if you want your website to respond to example.com, www.example.com, and widget.example.
In Server Admin, the Options pane in the Sites pane for each site has a Folder Listing checkbox. This setting enables folder listings for a specific virtual host by adding a “+Indexes” flag to Apache’s Options directive for that virtual host. If folder listings are not explicitly enabled for each site (virtual host), file indexes are not shown. The site-specific settings do not apply outside the site; therefore, site-specific settings do not apply to home directories.
Securing Web Content on Case Insensitive File Systems The recommended practice for serving web content whose access is controlled via the Realm mechanism is to serve it from case-sensitive volumes, such as UFS or HFSX, where a folder named “Protected’ and another folder named “PrOtECted” are two different folders. If you use the default case-insensitive HFS file system to serve access-controlled web content, consider using location-based realms rather than folder-based realms.
Chapter 3 Creating and Managing Websites
4 Creating and Managing Wikis and Blogs 4 This chapter shows you how to use Server Admin to create and manage a wiki and blog on your website. Mac OS X v10.5 makes it easy for groups to collaborate and communicate through their own wiki-powered intranet website, complete with group calendar, blog, and mailing list archive functions. Users can create and edit wiki pages, tag and cross-reference material, upload files and images, add comments, and search content with drag-and-drop ease.
About Wiki Pages The following is a list of the wiki pages and their description: Â Groups page: Page that links to all groups hosted by the wiki website. Â Wiki Home page: The home page of a group’s wiki. Contains links to pages, a group calendar, group blog, and search, as well as to the default sidebars (for example, "What's hot" and "Recent Changes"). Â Document pages: Pages that group members create. They are dynamically linked to and from other webpages and are found by using search and tags.
 /Library/Collaboration/Groups/groupname/ contains all files for one group’s services.  /Library/Collaboration/Groups/groupname/wiki/pagename.page/ contains the component files of a wiki page.  /Library/Collaboration/Groups/groupname/wiki/pagename.page/page.html contains the main text of the wiki (html content).  /Library/Collaboration/Groups/groupname/wiki/pagename.page/page.plist contains the metadata for the wiki page.  /Library/Collaboration/Groups/groupname/wiki/pagename.page/revisions.
Step 5: Connect to your wiki To make sure the wiki is working properly, open your browser and try to connect to it over the Internet. For details, see “Connecting to a Wiki” on page 65. Setting Up a Wiki The following sections provide instructions for setting up a wiki on your website. Enabling Wiki Web Services for a Website You can enable wiki web services on your website. In addition, blogs, calendaring, and mailing list web services are available for your site.
10 Click the Add (+) button below the Users/Group list to add users and groups who will create wikis on your site, then select the Moderator checkbox for each user or group in the list that you want to designate as a moderator. If you leave the list empty, all users can create wikis. 11 Click Save. Connecting to a Wiki If wiki web service is enabled on your website you can connect to the wiki. To connect to your wiki: 1 Open a web browser and navigate to website.
4 Click “save.” Managing Wiki Pages This section describes typical day-to-day tasks you might perform after you set up a wiki on your website. Initial wiki setup information appears in “Setting Up a Wiki” on page 64. Adding Document Pages You can add document pages to your wiki from your Internet browser. To create a wiki page: 1 Click “wiki” if you're not already viewing a wiki page, or navigate to the wiki page that you want to add a new page to. 2 Click the New Page (+) button in the toolbar.
3 Click Delete to confirm. The page disappears but the content is retained so the page can be restored if needed. Administrators and group owners can permanently delete the page. Adding a Link to a Wiki Page You can add hyperlinks that link to other wiki pages or to other websites. To add a link to a wiki page: 1 Navigate to the page you want to add a link to. 2 Click the Edit (/) button in the toolbar. 3 Select the text you want to use as the link text.
Adding Tags to Wiki Pages Tags lets you identify, categorize, and quickly find related wiki and blog pages. Use tags to group and identify related items and provide an easy-to-use organizational system so everyone contributing to the wiki can keep up with the latest changes and news. For example, you might add a tag to each page that indicates its department or project. Any user who can edit the site content can add or remove tags. You can search for tagged items to quickly find what you’re looking for.
6 Click Attach to upload the file. When the upload finishes a file download button appears on the page with the name of the file on it. 7 When you're finished editing the page, click “save” in the editing toolbar. A user can now click the name to download the file. If you're attaching a media file, such as an image, and you want others to see it without downloading it first, use the Insert Media button instead of the Attach FIle button. The Insert Media button lets you upload QuickTime image or audio files.
To view previous versions of a wiki page: 1 Navigate to the page you want to view older versions of. 2 Click the View Document History (>) button. This button is visible only when you're viewing, not editing, a page. 3 Select any version in the list to view its contents. 4 Click the Compare button to compare the selected version with its previous version. 5 Click the View Alone button to stop comparing versions.
 List Style: To move the left margin of the current paragraph or selected paragraphs in or out, or to apply a numbered or bulleted list style, choose an option from the pop-up menu. To number several lines or paragraphs sequentially, select them all before choosing Ordered List. To modify the text style: 1 Navigate to the page you want to modify. 2 Click the Edit (/) button in the toolbar to enter edit mode. 3 Select the text you would like to change.
Setting Up a Web Calendar The following sections provide instructions for setting up a web calendar on your website. Web calendar is a web service for groups that lets users access a group calendar to track meetings and deadlines from the web. The web calendar uses the iCal service in Mac OS X Server v10.5. iCal service must be configured and running for a wiki to use the group calendar. For more information, see iCal Service Administration.
To view another month, in month view, click the name of the month (between the Previous and Next buttons), and choose the month you want to view. 4 In week view, click Previous (<) to view the previous week or Next (>) to view the next week. 5 To open a minicalendar, in week view, click the name of the week and navigate to a specific week or month: To go to the previous month in the minicalendar, click Previous (up arrow). To go to the next month in the minicalendar, click Next (down arrow).
3 To change the name of the event, enter the name in the Summary field. 4 To change the location of the event, enter a new location in the Location field. 5 To change the start date of the event, click the date and in the calendar that appears, click the date of the event. To change the start date to today's date, click Today (diamond); to view the previous month, click Previous (up arrow); to view the next month, click Next (down arrow).
9 In the Title field, enter a name for your calendar. 10 To enable autoupdating of your iCal calendar, select Refresh and choose the updating frequency. 11 Click OK. Setting Up User and Group Blogs A blog is like a diary or journal, with entries that are arranged in the order they were created in. On the other hand, a wiki contains shared content that doesn't appear in chronological order. The type of information you want to put on your site helps determine whether it appears in a wiki or in a blog.
Setting Blog SACL Permissions for Users Web services administrators can use service access control lists (SACLs) to specify which users have access to blogs. Use Server Admin to set SACL permissions. Important: To change SACL settings for blogs, you must use the server interface, not the Web interface. To set user SACL permissions for a blog: 1 Open Server Admin and connect to the server. 2 Select the server. The list of services appears. 3 Click Settings. 4 Click Access.
5 Configuring and Managing Webmail 5 This chapter shows you how to enable Webmail for the websites on your server in order to provide access to basic mail operations via a web connection. Webmail adds basic mail functions to your website. If your web service hosts more than one website, Webmail can provide access to mail service on all sites. The mail service looks the same on all sites. Webmail Overview The Webmail software is included in Mac OS X Server and is disabled by default.
To use your Webmail service, a user must have an account on your mail server. Therefore, you must have the mail service set up if you want to offer Webmail on your websites. Users log in to Webmail with the name and password they use for logging in to their regular mail service. Webmail does not provide its own authentication. For more information about mail service users, see Mail Service Administration.
Important: Webmail will not work on a site if the mail protocols and Mail service are not configured and started. To enable Webmail for a site: 1 Make sure your mail service is started and configured to provide IMAP and SMTP service. 2 Make sure IMAP mail service is enabled for the user accounts of the users you want to have Webmail access. For details on mail settings in user accounts, see User Management. 3 Open Server Admin and connect to the server. 4 Click the triangle to the left of the server.
 Sent Folder: The name of the IMAP folder where Mail service puts messages after sending them. The default is Sent Messages.  Draft Folder: The name of the IMAP folder where Mail service puts the user’s draft messages. The default is Drafts. Important: If you use the interactive configuration script to change SquirrelMail settings, you must also use the script to enter the domain name of your server. If this is not done, Webmail can’t send messages.
You can create and maintain mailing lists with a web-based interface for users. You can also configure mailing list archiving, content filtering, and digest delivery options for mailing lists. For more information about mailing lists, see Mail Service Administration. Messages sent to a mailing list can be archived and browsed from your website at a later time. The messages are grouped into archival volumes by time and date.
Chapter 5 Configuring and Managing Webmail
6 Working with WebObjects and Open Source Applications 6 This chapter helps you become familiar with WebObjects and the open source applications Mac OS X Server uses to administer and deliver web services. WebObjects service is the application server component of Mac OS X Server. WebObjects offers versatile web development tools that let you extend your web server in a variety of ways. In addition, several open source applications provide essential features for Web service.
WebObjects Overview Mac OS X Server includes the WebObjects run-time libraries and an unlimited deployment license to facilitate developing standards-based web services and Java server applications. You can optionally purchase WebObjects development tools from the Apple Store (store.apple.com), Apple’s retail stores, and authorized Apple resellers. You can set WebObjects to start when the server starts. This ensures that WebObjects modules start after a power failure or after the server shuts down.
4 Click Settings. 5 Specify the wotaskd port or the Monitor port as desired. Monitor and wotaskd are part of the WebObjects deployment strategy. Each machine that is running a WebObjects application should have wotaskd running on it. To configure these applications for deployment, run the Monitor application. After WebObjects is configured, only wotaskd must remain running. Each wotaskd instance is only responsible for WebObjects applications running on the same host.
2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select WebObjects. 4 Click Overview to see if WebObjects service is running, the time it started if it is running, and to see if Monitor is running. Stopping WebObjects Service You can use Server Admin to stop WebObjects service. To stop WebObjects service: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears.
Mac OS X Server v10.5 supports two versions of the Apache web server—Apache 1.3 and Apache 2.2. Both Apache 1.3 and Apache 2.2 are supported by Server Admin. Apache 2.2 runs as a 64-bit process on appropriate hardware, but Apache 1.3 is 32-bit only. The two versions can be manually configured to run side by side as long as they do not both attempt to listen on the same IP address / service port combination. Only one version is managed by Server Admin, and running both concurrently is not supported.
This file also has a directive to include the .../sites/ folder. That folder contains all virtual hosts for that server. The files are named with the unique identifier of the virtual host (for example, 0000_17.221.43.127_80_www.example.com.conf ). You disable specific sites by moving them to the sites_disabled folder and then restarting Web service. You can also edit site files as long as the conventions in the file are followed. One hidden file in the sites_disabled folder is named “default_default.conf.
If you want to use the apachectl script to start and stop Web service instead of using Server Admin, be aware of the following: Â The web performance cache is enabled by default in Mac OS X Server v10.5. For upgrade installations, with Apache 1.3, the web performance cache is enabled in v10.5 only if it was enabled prior to the upgrade. When Web service starts, the main web service process (httpd) and a webperfcache process start.
Using Apache Axis Apache Extensible Interaction System (Axis) is an implementation of Simple Object Access Protocol (SOAP). More about SOAP can be found at www.w3.org/TR/SOAP. More about Axis can be found at:ws.apache.org/axis. You can use Apache Axis by writing web applications that use the Axis libraries and then deploy the applications in Tomcat. Unlike Tomcat, Axis is not usually used as an application server. Mac OS X Server v10.5 includes a preinstalled version of Apache Axis (v1.
The Java Servlet and JavaServer Pages specifications are developed by Sun Microsystems under the Java Community Process. The current production series is the Tomcat 4.1.x series, which implements Java Servlet 2.3 and JavaServer Pages 1.2 specifications. For more information about Tomcat and documentation for this software, see http://tomcat.apache.org/. For information about Java Servlets that you can use on your web server, see:  java.sun.com/products/servlet  java.sun.
Working with MySQL MySQL provides a relational database management solution for your web server. With this open source software, you can link data in different tables or databases and provide the information on your website. The MySQL Manager application is replaced by the MySQL service in Server Admin. Turning MySQL Service On Before you can configure your database manager, you must turn MySQL service on in Server Admin. To turn MySQL service on: 1 Open Server Admin and connect to the server.
The list of services appears. 3 From the expanded Servers list, select MySQL. 4 Click Start MySQL (below the Servers list). The service runs until you stop it and restarts if your server is restarted. Checking the Status of MySQL Service You can use Server Admin to monitor MySQL service. To check the status of MySQL service: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select MySQL.
The list of services appears. 3 From the expanded Servers list, select MySQL. 4 Click Stop MySQL (below the Servers list). Upgrading MySQL Mac OS X Server v10.5 includes the latest version of MySQL, v5.0. Because it’s preinstalled, you won’t find it in /usr/local/mysql. Instead, its elements are distributed in the file system according to standard UNIX file layout as follows: Â MySQL executables are located in the /usr/sbin/ and /usr/bin/ folders.
This is helpful because it allows the Server Admin Web Site Proxy panel to find instances of Mongrel running on the same machine, and presents their URLs in the Balancer Members popup. More details about mongrel_rails_persist are available on its main page. Â It allows administration of Apache 2.2 mod_proxy_balancer in the Server Admin web service Sites Proxy panel.
If you specified a model or scaffold in your Rails application, the URL might be something like: http://127.0.0.1:3001/ModelName You should see the “Welcome Aboard / You’re riding the rails” page. 4 Open Server Admin and connect to the server. 5 Click the triangle to the left of the server. The list of services appears. 6 From the expanded Servers list, select Web. 7 Click Sites, then select the website in the list. 8 Click Proxy below the websites list. 9 Select the Enable Reverse Proxy checkbox.
Scenario 2 - Sharing a Website (Virtual Host) with the Proxied Web Application 1 Open Terminal and enter the following commands to create your Ruby on Rails application outside the document root of any existing web virtual host (for example in /Library/WebServer/MyWebApp, where MyWebApp is the name of your rails application). $ cd /Library/WebServer $ rails MyWebApp $ ...
15 Leave the Route field blank unless you have a specific reason to enter a value. 16 Click OK. 17 Click Save. 18 Start Web Service, if it is not already running. 19 Use Safari to access the proxy URL to confirm that the web application is responding: http://127.0.0.1/rails/ If you specified a model or scaffold in your Rails application, the URL might be something like: http://127.0.0.
7 Managing Web Modules 7 This chapter familiarizes you with Apache web modules that provide key features and controls for Web service. The Apache web server includes a series of modules that control the server’s operation. In addition, Mac OS X Server provides modules with specialized functions for the Macintosh. Apache Web Module Overview Modules plug in to the Apache web server software and add functionality to your website.
 encoding_module requires that headers_module, dav_module, and dav_fs_module are enabled.  cache_module is required for mem_cache_module and disk_cache_module. Important: Web modules used with Apache 1.3 are different from web modules used with Apache 2.2. Viewing Web Modules You can view a list of modules in use or available for use on the server. To view web modules: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears.
Enabling Web Modules You can use Server Admin to enable modules for your web server. To enable Web service modules: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 Click Settings, then click Modules. 5 Scroll through the modules list to see the set of modules in use or available for use on the web server. 6 Click the Enable checkbox next to the module you want to enable. 7 Click Save.
Deleting Web Modules You can use Server Admin to remove web modules from your server. To delete web modules: 1 Open Server Admin and connect to the server. 2 Click the triangle to the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 Click Settings, then click Modules. 5 Scroll through the modules list to see the set of modules in use or available for use on the web server. 6 Select the module you want to remove and click the Delete (–) button. 7 Click Save.
mod_hfs_apple This module requires users to enter URLs for HFS volumes using the correct case (lowercase or uppercase). This module adds security for case-insensitive volumes. mod_digest_apple This module enables digest authentication for a WebDAV realm. This is the older, default digest authentication module, based on Apache’s mod_digest but modified to use Open Directory rather than htdigest files. It is the default digest module because it works with Open Directory masters running Mac OS X Server v10.4.
PHP PHP Hypertext Preprocessor (PHP) lets you handle dynamic web content by using a server-side, HTML-embedded scripting language resembling C. Web developers embed PHP code in HTML code, allowing programmers to integrate dynamic logic directly in an HTML script rather than writing a program that generates HTML. PHP provides functions similar to those of CGI scripts but it supports a variety of database formats and can communicate across networks by using many protocols.
EncodingEngine directive: This directive enables and disables mod_encoding. Correct operation of mod_encoding also requires that the special version of mod_dav, mod_dav_encoding, be enabled as well. Syntax Default Context Compatibility EncodingEngine [ on | off ] Off Server Config Apache 1.3.
Chapter 7 Managing Web Modules
8 Solving Web Service Problems 8 If you experience a problem with Web service or one of its components, use the tips and strategies in this chapter. From time to time you might encounter a problem when setting up or managing Web services. Situations that might cause a problem for administering Web service or for client connections are outlined here.
 If the module came with your web server, read the Apache documentation for that module and make sure the module is intended to work the way you expected.  If you installed the module, read the documentation that came with the web module to make sure it is installed correctly and is compatible with your server software. For more information about supported Apache modules for Mac OS X Server, see “Working with Web Modules” on page 99 and the Apache website at www.apache.org/ docs/mod.
Glossary Glossary Apache An open source HTTP server integrated into Mac OS X Server. You can find detailed information about Apache at www.apache.org. application server Software that runs and manages other applications, usually web applications, that are accessed using a web browser. The managed applications reside on the same computer where the application server runs. blog A webpage that presents chronologically ordered entries. Often used as an electronic journal or newsletter.
IP Internet Protocol. Also known as IPv4. A method used with Transmission Control Protocol (TCP) to send data between computers over a local network or the Internet. IP delivers data packets and TCP keeps track of data packets. IP address A unique numeric address that identifies a computer on the Internet. JavaScript A scripting language used to add interactivity to webpages. JBoss A full-featured Java application server that provides support for Java 2 Platform, Enterprise Edition (J2EE) applications.
protocol A set of rules that determines how data is sent back and forth between two applications. proxy server A server that sits between a client application, such as a web browser, and a real server. The proxy server intercepts all requests to the real server to see if it can fulfill the requests itself. If not, it forwards the request to the real server. realm General term with multiple applications. See WebDAV realm, Kerberos realm. SSL Secure Sockets Layer.
Glossary
A access ACLs 62 and aliases 45 and Apache Axis 90 blog service 17, 76 CGI script permissions 51 client connections 32, 33 proxy server 27 securing web content 59 user 20, 40 WebDAV 19, 54, 55, 104 webmail 78 website 36, 40, 45 accounts, webmail 78 ACLs (access control lists) 62 AddClientEncoding directive 105 addresses.
web server 17 web service 23, 24, 28, 29 websites 18, 19, 35, 36, 49, 57 wikis 63 content handlers 21, 25 CSS (Cascading Style Sheets) 71 D dav_fs module 99 dav module 99 decryption 43 DefaultClientEncoding directive 105 digest authentication, WebDAV 41, 103 digest module 99 disk_cache module 100 DNS (Domain Name System) service 45, 56, 89 documentation 11, 12, 13 Domain Name System. See DNS E headers module 100 help, using 10 home folders 57 hosts.
mod_encoding module 103 mod_fastcgi module 95 mod_hfs_apple module 59, 103 mod_macbinary_apple module 102 mod_perl module 104 mod_proxy_balancer module 95 mod_spnego module 103 mod_spotlight_apple module 102 modules, web adding 100 enabling 101 Macinstoch-specific 59, 102, 103 modifying 101 overview 99 PHP 103 Ruby on Rails 95 setup 28 Tomcat 90, 91, 103 troubleshooting 107 viewing 100 mongrel_rails tool 95 Mongrel web server 94 Monitor, WebObjects 86 multicast DNS registration 89, 103 multihoming 56 multip
proxy 27, 38, 47 setup for web 17 Tomcat 90, 91, 103 See also Apache web server; websites server side includes. See SSI service access control lists. See SACLs setup procedures. See configuration; installation shared files. See file sharing short name 58 SMTP (Simple Mail Transfer Protocol) 78 Soap (Simple Object Access Protocol) 90 SPNEGO/Negotiate protocol 103 Spotlight searching 40, 52 SquirrelMail.
user content 39, 57, 59, 107 viewing 31 See also blog service; WebDAV; wikis web technologies overview 9, 15, 16, 17 wikis and blog service 62, 64 calendar feature 72, 73, 74 connections 65 customizing 70, 71 definition 48 enabling 64 file organization 62, 68, 69 Index help resources 71 logs 42 overview 61, 62 page management 66, 67, 68, 69, 70 security 62 settings 65 setup overview 63, 64 themes 29, 71 wildcard, website aliases 45 wireframe theme, wiki 71 wotaskd daemon 84 117