Mac OS X Server Web Technologies Administration Version 10.
KKApple Inc. © 2009 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.
Contents 7 7 7 8 9 10 10 11 11 Preface: About This Guide 12 12 13 13 13 13 14 14 14 14 14 15 15 15 16 16 16 17 17 17 18 Chapter 1: Web Technologies Overview What’s New in Web Service What’s in This Guide Using Onscreen Help Documention Map Viewing PDF Guides Onscreen Printing PDF Guides Getting Documentation Updates Getting Additional Information Web Technologies Overview Key Web Features Apache Web Server WebDAV CGI Support SSL Support Dynamic Content with Server Side Includes (SSI) Blogs and RSS S
19 19 20 20 21 22 24 26 26 27 28 28 29 30 30 31 31 32 32 33 33 36 36 36 37 38 39 40 42 43 45 47 47 48 48 48 49 50 50 51 51 52 4 Chapter 2: Working with Web Service Setup Overview Turning Web Service On Setting Up Web Service Configuring Web Service General Settings Configuring Web Service MIME Types Settings Configuring Web Service Proxy Settings Configuring Web Service Modules Settings Configuring Web Service Server Settings Starting Web Service Managing Web Service Checking Web Service Status Viewing
2 52 53 54 55 55 55 56 56 56 57 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 58 58 58 59 59 60 60 Chapter 4: Configuring and Managing Webmail Webmail Basics Webmail Us
76 77 77 78 78 79 79 79 79 79 79 79 79 79 80 80 80 82 82 Viewing Web Modules Adding Web Modules Enabling Web Modules Changing Web Modules Deleting Web Modules Macintosh-Specific Modules mod_auth_apple mod_hfs_apple mod_auth_digest_apple mod_spnego_apple mod_encoding mod_bonjour Open Source Modules Tomcat PHP mod_perl mod_encoding (open-source) mod_xsendfile mod_python 83 83 84 84 Chapter 7: Solving Web Service Problems 85 Index 6 If Users Can’t Connect to a Website on Your Server If a Web Module o
Preface About This Guide This guide provides instructions for setting up and managing a web server and websites, and how to use open source web technologies. Mac OS X Server v10.6 includes Web service, which is comprised of multiple web technologies. Web service comes installed on Apple server hardware and offers an integrated, flexible environment for establishing and managing web technologies. What’s New in Web Service Web service in Mac OS X v10.
ÂÂ Chapter 6, “Managing Web Modules,” describes the modules included in Mac OS X Server and explains how to install, enable, and view modules. ÂÂ Chapter 7, “Solving Web Service Problems,” helps you address issues with web technologies and websites. Note: Because Apple periodically releases new versions and updates to its software, images shown in this book may be different from what you see on your screen.
Documention Map Mac OS X Server has a suite of guides that can cover management of individual services. Each service may dependent on other guides for maximum utility. The documentation map below shows some related guides that you may need in order to fully configure Web service to your specifications. You can get these guides in PDF format from the Mac OS X Server Resources website at www.apple.com/server/ macosx/resources/.
Viewing PDF Guides Onscreen While reading the PDF version of a guide onscreen: ÂÂ Show bookmarks to see the guide’s outline, and click a bookmark to jump to the corresponding section. ÂÂ Search for a word or phrase to see a list of places where it appears in the guide. Click a listed place to see the page where it occurs. ÂÂ Click a cross-reference to jump to the referenced section. Click a web link to visit the website in your browser.
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 Resources website at www.apple.
Web Technologies Overview 1 Use this chapter to become familiar with web technologies and to understand the major components before setting up web services and sites. 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 open-source components. This chapter helps to familiarize you with the complexities of your system before proceeding.
When configuring Web service, make sure your DNS server is properly configured, and if you are going to require authentication for your Web service you must configure an Open Directory or Active Directory server. For more information about configuring DNS, see Network Services Administration. Also, for more information about configuring a directory server, see Open Directory Administration.
It is possible to write CGI scripts in several scripting languages, including Perl and Python. The folder /Library/WebServer/CGI-Executable is the default location for CGI scripts. 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.
Providing Secure Transactions To provide secure transactions on your server, set up SSL protection. SSL lets you send encrypted, authenticated information across the Internet. For example, to authorize credit card transactions through your website, 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 39.
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 an action or a MIME type.
Working with Web Service 2 Use this chapter to learn 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 based 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 Service Server Settings” on page 26. Step 8: Start Web service. After you configure Web service, start the service to make it available. See “Starting Web Service” on page 27. Turning Web Service On Before you can configure web settings, you must turn on Web service in Server Admin.
Configuring Web Service General Settings You use the General settings pane in Web service to configure web server connection settings, spare server settings, and to enable or disable Tomcat. For more information on web server connection settings, see “Performance Tuning” on page 31. To configure Web service General settings: 1 Open Server Admin and connect to the server. 2 Click the triangle at the left of the server. The list of services appears. 3 From the expanded Servers list, select Web.
From the command line: mm To view a setting: $ sudo serveradmin settings web:setting mm To view a group of settings: $ sudo serveradmin settings web:IFModule:_array_id:mod_alias.c:* You can view a group of settings that have part of their names in common by entering as much of the name as you want, stopping at a colon (:), and entering an asterisk (*) as a wildcard for the remaining parts of the name.
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. In Server Admin, these files are displayed in two lists: MIME Types and Content Handlers. You can edit items in each list and add or delete items in either list. To configure MIME Types settings: 1 Open Server Admin and connect to the server.
Configuring Web Service 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.
5 Select the Enable Forward Proxy checkbox. If a forward proxy server is enabled, each site on the server can be used as the proxy. You might see this message: “Forward Proxy will not properly function with current site configuration.” This issue is resolved further in the procedure, so click Ok to continue. 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.
Configuring Web Service Modules Settings You use the Modules settings pane in Web service to configure the web modules your server will use. The Web service in Mac OS X Server is modular. This means that administrators have more flexibility in the web technologies that are added to the service. For more information on web modules, see “Working with Web Modules” on page 75. To configure Web service modules settings: 1 Open Server Admin and connect to the server.
7 In the SMTP Relay field, click Configure and enter the name of the server used to deliver email notifications. If the server you are configuring is not running an SMTP server, enter a relay SMTP server that can deliver email notification messages. 8 From the Default Theme pop-up menu, choose the theme for your wiki. A theme controls the appearance of a wiki and blog. Themes determine the color, size, location, and other attributes of wiki and blog elements. Each theme is implemented using a style sheet.
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 20. For more information about website management, see “Managing Websites” on page 48. Checking Web Service Status Use Server Admin to check the status of Web service. To view Web service status: 1 Open Server Admin and connect to the server. 2 Click the triangle at the left of the server.
Viewing Web Service Logs Use Server Admin to view the error and access logs for Web service, if you 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 at the left of the server. The list of services appears. 3 From the expanded Servers list, select Web.
For information about serveradmin, see its man page. For the basics of command-line tool usage, see Introduction to Command-Line Administration. Viewing Web Graphs Use Server Admin to view Web service graphs. To view web graphs: 1 Open Server Admin and connect to the server. 2 Click the triangle at the left of the server. The list of services appears. 3 From the expanded Servers list, select Web. 4 To see graphs of connected users or throughput, click Graphs.
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. Setting Simultaneous Connections for the Web Server You can specify the number of simultaneous connections to your web server. When the maximum number of connections is reached, new requests receive a message that the server is busy. Simultaneous connections are concurrent HTTP client connections.
Setting Persistent Connections for the Web Server You can set up your web server to respond to multiple requests from a client computer without closing the connection each time. Repeatedly opening and closing connections isn’t efficient and decreases performance. Most browsers request a persistent connection from the server, and the server keeps the connection open until the browser closes the connection. This means the browser is using a connection even when no information is being transferred.
Creating and Managing Websites 3 Use this chapter to 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 1: Configure your web server.
Step 3: Assign privileges for your website. The Apache processes that serve webpages must have Read access to files and Read/Execute access to 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 6: (Optional) Configure website Apache options. Use the Sites Options pane to configure Apache web options. For details, see “Configuring Website Apache Options” on page 38. Step 7: (Optional) Create 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 website realms. For details, see “Using Realms to Control Access” on page 39. Step 8: Enable website access and error logs.
Setting Up Your Website The following sections provide instructions for setting up your website. Setting Up the Web Folder To make files available through a website, put the files in the web folder for the site. To organize the information, you can create subfolders inside the web folder. The folder is located in /Library/WebServer/Documents/. In addition, each registered user has a Sites folder in the user’s home folder. Graphics or HTML pages stored here are served from http://server.example.
WARNING: Do not try to access the server through the direct ports. Instead, allow your access to be proxied through Apache as it is set up. For instance, Server Admin provides no obvious way to configure wikis, and will return the xmlrpc error. In addition, do not access the wiki server on port 8086 or 8087. 7 Enter the path to the folder you set up for this website. You can also click the Choose button and browse for the folder you want to use.
Configuring Website Apache Options The default page appears when a user connects to your website by specifying a folder or host name instead of a file name. To configure website Apache options: 1 Open Server Admin and connect to the server. 2 Click the triangle at 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 Options below the websites list.
Using Realms to Control Access You can use realms to control access and provide security to locations or folders within a website. Realms are locations at the URL or they are files in the folder that users can view. If WebDAV is enabled, users with authoring privileges can also change content in the realm. You set up the realms and specify the users and groups that have access to them.
9 Enter the realm location or folder you are restricting access to: ÂÂ Choose Location from the pop-up menu and enter a URL to the location in the website that you want to restrict access to. ÂÂ Choose Folder from the pop-up menu and enter the path to the folder that you want to restrict access to. You can also click the Browse button to locate the folder you want to use. 10 Click OK. 11 Select the new realm and click Add (+) to open the Users & Groups window.
To enable access and error logs for a website: 1 Open Server Admin and connect to the server. 2 Click the triangle at 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 Logging below the websites list. 6 Click the “Enable Access Log” checkbox to enable this log. 7 Set how often you want the Access log to be archived by selecting the “Archive every __ days” checkbox and entering the number of days.
Enabling Secure Sockets Layer (SSL) Secure Sockets Layer (SSL) provides security for a site and its users by authenticating the server, encrypting information, and maintaining message integrity. SSL is a per-site setting that lets you send encrypted, authenticated information across the Internet. For example, to permit credit card transactions through a website, you can protect the information that’s passed to and from that site.
4 Click Sites, then select the website in the list. 5 Click Security below the websites list. 6 In the Security pane, click the “Enable Secure Sockets Layer (SSL)” checkbox. When you turn on SSL, a message appears, noting that the port is changed to 443. 7 In the Certificate pop-up menu, choose the certificate you want. If the certificate is protected by a passphrase, the name of the certificate must match the virtual host name. If the names don’t match, Web service won’t restart.
For example, you could set up a redirect so that if the user enters a URL such as www.example.com/images/boats.jpg and the site has an images folder containing the boats.jpg file, the browser gets redirected to www.apple.com. By default, the Sites Aliases panel lists the following redirects: ÂÂ /collaboration — used to provide the CSS required by Apple’s wiki and blog pages and default index.
To create or edit aliases the site responds to: 1 Open Server Admin and connect to the server. 2 Click the triangle at 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 Aliases below the websites list. 6 To create aliases, click the Add (+) button under the Web Server Aliases list or select an alias and click the Edit button. 7 In the Server Alias field, enter an alias and click OK.
The reverse proxy is usually enforced by an external or LAN firewall, which only permits authorized outbound connections to the web server through port 80 or port 443 for SSL connections. It also restricts access to only authorized proxy servers. No other outbound connections are permitted through the firewall and no unauthorized web users are permitted through the proxy server. Mac OS X Server v10.6 provides forward and reverse proxy. The forward proxy is configured in the Web service Settings pane.
Enabling Optional Web Services You can enable additional web services such as wikis, blogs, or webmail. To enable optional web services: 1 Open Server Admin and connect to the server. 2 Click the triangle at 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 Web Services below the websites list. 6 To enable blogs for your website, select the “User blogs” checkbox.
3 If you’ve restricted access to specific users, enter a valid user name and password. WARNING: Do not try to access the server through the direct ports. Instead, allow your access to be proxied through Apache as it is set up. For instance, Server Admin provides no obvious way to configure wikis and will return the xmlrpc error. Do not access the wiki server on port 8086 or 8087. 4 Verify that the website default index page appears.
4 Click the triangle at the left of the server. The list of services appears. 5 From the expanded Servers list, select Web. 6 Click Sites, then select the website in the list. 7 In the website General pane, enter the path to the web folder in the Web Folder field, or click Choose and navigate to the new web folder location. 8 Click Save. Changing the Access Port for a Website By default, the server uses port 80 for connections to websites on your server.
Enabling a Common Gateway Interface (CGI) Script Common Gateway Interface (CGI) scripts (or programs) send information between your website and applications that provide different services for the site. If a CGI script is to be used by only one site, install the script in the Documents folder for the site. The script file name must end with the suffix “.cgi.” If a CGI script is to be used by all sites on the server, install it in the /Library/ WebServer/CGI-Executable folder.
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. Website logs are used to track who accesses a website and what errors occur on a website. This information is useful when troubleshooting problems or monitoring malicious activity. For more information on setting up logs, see “Enabling Access and Error Logs for a Website” on page 40.
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 16. Work with WebDAV as explained in the following sections. Enabling WebDAV on Websites If you enable WebDAV, you must also assign access privileges for the sites and web folders.
Browsers are not generally WebDAV-enabled, but a browser can access a WebDAV-enabled site and perform read operations (limited by realm permissions configured on the web server), because WebDAV is a superset of HTTP. Write operations cannot be performed by a web browser. They require a WebDAV client, such as Goliath, or the client built into the Mac OS X file system and typically used through the Finder. For more information about Goliath, see www.webdav.org/goliath.
ÂÂ 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 use WebDAV you must enable it in Server Admin. When enabled, Server Admin changes the group ownership of the WebDAV folder to www.
Using Aliases to Have a Site Respond to Multiple Names If you want a website to respond to multiple names, choose one name as the primary and add the other names as aliases. 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 host 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 43.
Web Service Configuration All folder listings in Web service use Apache’s FancyIndexing directive, which makes folder listings more readable. 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.
Indexing settings also apply to subfolders placed in the user’s Sites folder. If the user adds a content subfolder named Example to the Sites folder and an index.html file is present inside the Example folder, or if folder indexing is enabled for that user’s site, the folder is made available to browsers at http://example.com/~refuser/Example.
Configuring and Managing Webmail 4 Use this chapter to learn how to enable Webmail for the websites on your server 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. Mail service looks the same on all sites. Webmail Basics Webmail software is included in Mac OS X Server and is disabled by default. Webmail is based on SquirrelMail (v1.
To use Webmail, a user must have an account on your mail server. Therefore, you must have Mail service set up to offer Webmail. 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. When users log in to Webmail, their passwords are sent over the Internet in clear text (not encrypted) unless the website is configured to use SSL.
Enabling Webmail Use Server Admin to enable Webmail for websites hosted on your web server. Changes you make take effect when you restart Web server. 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 users that want Webmail access.
You can configure the following SquirrelMail options to integrate Webmail with your site: ÂÂ Organization Name: The name that appears on the main Webmail page when a user logs in. The default is Mac OS X Server Webmail. ÂÂ Organization Logo: The relative or absolute path to an image file. ÂÂ Organization Title: The title of the web browser window while viewing a Webmail page. The default is Mac OS X Server Webmail.
Working with Open Source Applications 5 Use this chapter to become familiar with open source applications Mac OS X Server uses to administer and deliver web services. Several open source applications provide essential features for Web service. These applications include: ÂÂ Apache web server ÂÂ Tomcat servlet container ÂÂ MySQL database ÂÂ Ruby on Rails Working with Apache Apache is the open source HTTP web server provided with Mac OS X Server.
File Description Apache 2.2 Location Configuration file for Web service /etc/apache2/ folder Site configuration files /etc/apache2/sites/ folder Executable file /usr/sbin/httpd Web modules /usr/libexec/apache2/ folder Error log /var/log/apache2/ folder (with a symlink that lets the folder be viewed as /Library/Logs/WebServer/) Temporarily disabled virtual hosts /etc/apache2/sites_disabled/ folder Static content for both Apache versions defaults to /Library/WebServer/Documents/.
Restoring the Default Configuration It is possible to restore a factory setting or default configuration of Apache without reinstalling Mac OS X Server. The various .default files in the Apache configuration directories are put there for this purpose and are installed as Read-Only files to discourage administrators from modifying them. To restore the default configuration: 1 Open Terminal.
To stop Apache from the command line: 1 Open your script. 2 Enter the following command: serveradmin stop web This stops Apache and places a flag in /etc/hostconfig to not start Web service on restart. 3 Save and run your script. About Apache Multicast DNS Registration Do not use Apache multicast DNS registration with the server. Important: Do not try to turn on Apache multicast DNS (MDNS) registration for the server. It does not support virtual hosts, and the server uses virtual hosts.
Follow the instructions that accompany the warning messages if you require those optional components. Consult Axis User’s Guide to learn more about using Axis in your own web applications. This guide is located at ws.apache.org/axis/java/user-guide.html. Working with Tomcat Tomcat adds Java servlet and JavaServer Pages (JSP) capabilities to Mac OS X Server. Java servlets are Java-based applications that run on your server, in contrast to Java applets, which run on the user’s computer.
4 Click Settings, then click General. 5 Select the Enable Tomcat checkbox. 6 Click Save. From the command line: mm To start Tomcat: $ sudo /Library/Tomcat/6.0/bin/startup.sh To verify that Tomcat is running, use a browser to access port 9006 on your website server by entering the URL for your site followed by :9006. If Tomcat is running, this URL shows the Tomcat home page. Working with MySQL MySQL provides a relational database management solution for your web server.
5 Select the “Allow network connections” checkbox to permit users to access MySQL service. This grants users access to database information through the web server. 6 Enter the path to the location of your database in the Database location field. You can also click the Choose button and browse for the folder you want to use. 7 Click Save.
Starting MySQL Service You start MySQL service from Server Admin. To start MySQL service: 1 Open Server Admin and connect to the server. 2 Click the triangle at the left of 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.
Viewing MySQL Service and Admin Logs MySQL service keeps two types of logs: ÂÂ The MySQL service log, which records the time of events such as when MySQL service is started and stopped. ÂÂ The MySQL admin log, which records information such as when clients connect or disconnect and each SQL statement received from clients. This log is located at /Library/Logs/MySQL.log. You can view MySQL service logs using Server Admin. To view MySQL service logs: 1 Open Server Admin and connect to the server.
At some point a newer version of MySQL will be posted to www.mysql.com. At that time you can download the source and build it (if you have the developer packages installed) or you can download the relevant binary distribution and install it, following the instructions posted on that website. By default, such installations reside in the /usr/local/mysql/ folder. If you install your own version of MySQL, you’ll have two versions of MySQL present on your system.
Managing the Deployment of Ruby on Rails Applications You can use Server Admin to manage the deployment of Ruby on Rails applications with the Apache 2.2 mod_proxy_balancer module. You can dedicate your website (virtual host) to Ruby on Rails or you can share your website with Ruby on Rails. The following scenarios describe how to do this: ÂÂ In the first scenario, the website is dedicated to the Ruby on Rails web application.
9 Select the Enable Reverse Proxy checkbox. 10 Verify that the Proxy path field is set to “/.” This requires URLs within the website to be proxied to the balancer group. 11 Leave the Stick Session Identifier field blank unless you have reason to specify a value. 12 To add a balancer member, click the Add (+) button below the Balancer Members list. 13 From the Server URL pop-up menu, designate the URL for the load balancer member.
If you specified a model or scaffold in your Rails application, the URL might be something like http://127.0.0.1/rails/. 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 at 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.
Managing Web Modules 6 Use this chapter to become familiar 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.
ÂÂ dav_module and dav_fs_module should be in the same state. ÂÂ 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. ÂÂ mod_userdir is disabled by default. ÂÂ mod_userdir_apple, a secure replacement for mod_userdir, does not distinguish between nonexistent users and users who cannot access to userdir.
Adding Web Modules You can use Server Admin to add web modules to your web server. Before you can add a web module to the server, the module must be installed. To install a module, follow the instructions that came with the module software. The web server loads modules from the /usr/libexec/apache2/ folder. To add web modules to the server: 1 Open Server Admin and connect to the server. 2 Click the triangle at the left of the server. The list of services appears.
Changing Web Modules You can use Server Admin to change web modules on your server. To modify web module settings: 1 Open Server Admin and connect to the server. 2 Click the triangle at 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 change and click the Edit (/) button.
Macintosh-Specific Modules Web service in Mac OS X Server installs the following modules specific to the Macintosh. mod_auth_apple This module allows a website to authenticate users by looking for them in file system service domains in the server’s search policy. When authentication is enabled, website visitors are prompted for a user name and password before they can access information about the site.
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 v2.2.
For additional information about mod_encoding, download a version and read additional documentation provided in the source distribution from www.denpa. org/~go/denpa/200302/mod_encoding+mod_dav-macosx.tar.gz. mod_xsendfile This module is a small Apache2 module that processes X-SENDFILE headers registered by the original output handler.
Solving Web Service Problems 7 If you experience a problem with Web service or 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 Users Can’t Connect to a Website on Your Server Try these strategies to uncover the problem: ÂÂ Make sure Web service is turned on and the site is enabled.
If a Web Module or Component Is Not Functioning as Expected Try the following strategies to uncover the problem: ÂÂ Read the error log in Server Admin for information about why the module might not be working. ÂÂ 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.
A access aliases 43 Apache Axis 65 blog service 14 CGI script permissions 50 client connections 31, 32 proxy server 24 securing web content 57 user 17, 39 WebDAV 16, 52, 53, 80 webmail 59 website 34, 39, 43 accounts, webmail 59 AddClientEncoding directive 81 addresses.
DefaultClientEncoding directive 81 digest authentication, WebDAV 39, 79 digest module 75 directory services, Open Directory 79 disk_cache module 76 DNS (Domain Name System) service 43, 55, 65, 79 documentation 9, 10, 11 Domain Name System. See DNS domains, directory, Open Directory 79 E email. See webmail encoding module 76 EncodingEngine directive 81 encryption 14, 42 error messages.
viewing 76 mod_xsendfile module 82 Mongrel web server 71 mongrel_rails tool 71 multicast DNS registration 65, 79 multihoming 54 multiple websites on server, managing 15, 54, 55 Multipurpose Internet Mail Extensions.
U upgrading Apache web server 13 MySQL 70 user accounts, webmail 59 users access control 17, 39 blog service 14 home folders 55 permissions 16, 17, 39, 51, 52 webmail 58, 59 websites 37, 56, 57, 83 wikis 47 See also clients, groups V virtual hosts 54, 65 W web browsers and WebDAV access 53 web service connections 31, 32 graphs 30 logs 29 management of 28 setup 19, 20, 21, 26 starting 20, 27 status checking 28 stopping 30 troubleshooting 83, 84 See also blog service, modules, webmai