
Chapter 3 Managing Websites 41
When the performance cache is enabled (default) the “%h” item will extract the local
machine’s IP address. To extract the remote client’s IP address, the log format string
needs to be modified as follows:
%{PC-Remote-Addr}i %l %u %t "%r" %>s %b
When you use the Server Admin application to enable and disable web performance
cache for each site (virtual host), the CustomLog directive in httpd.conf for each site is
adjusted automatically so your access logs should always contain the correct remote
client address.
For more information about log format strings, see the information at
http://httpd.apache.org/docs/mod/mod_log_config.html#formats.
Setting Up Directory Listing for a Website
When users specify the URL for a directory, you can display either a default webpage
(such as index.html) or a list of the directory contents. You can display a folder list. To
set up directory listing, you need to enable indexing for the website.
Note: Folder listings are displayed only if no default document is found.
To enable indexing for a website:
1 In Server Admin, click Web in the list for the server you want.
2 Click Settings in the button bar.
3 In the Sites pane, double-click the site in the list.
4 In the Options pane, select Folder Listing.
5 Click Save.
Creating Indexes for Searching Website Content
The mod_spotlight_apple Apache module allows web browsers to search the content
of your website. This module replaces the mod_sherlock_apple module used in
previous versions of Mac OS X Server. The indexfolder command-line tool is no longer
supported.
Note: The entire Spotlight mechanism is turned off by default in Mac OS X Server
version 10.4. You must turn it on to provide Spotlight-based search capability.
Step 1: Enable Spotlight by editing a config file
To enable Spotlight, you open the file /etc/hostconfig and replace SPOTLIGHT=-NO-
with SPOTLIGHT=-YES-. Then either reboot or, using the Terminal application, run the
System Startup Item that normally launches the Spotlight processes:
sudo SystemStarter start "MetaData Search"
This may have performance implications.
Komentarze do niniejszej Instrukcji