Mac OS X Server 10.2 continues to work with the mod_sherlock_apple Apache module, which allows Web browsers to search the content of your Web site. As in previous versions of the server, you must produce a content index before content searching is possible.
Content indexes in earlier server versions were created in Sherlock. Content indexes are now created using the Finder. Select the folder containing the files you want to index, then choose Get Info from the File menu. Click Content Index, then click Index Now.
In addition, there are new constraints that restrict the creation of index files. To create an index, you must be the owner of the folder and must own any files in that folder that are to be indexed. In the case of content in the /Library/WebServer/Documents folder, the folder and all the files within it are owned by root. Even though the folder and files can be written to by members of the admin group, you must still be logged in as root to create a content index.
Creating an index remotely or on a headless server is done using a command-line tool named indexfolder. See the man pages for usage details. The operation of indexfolder is affected by the login window. If nobody is logged in at the login window, the tool must be run as root. If an Admin user is logged in at the login window, the tool must be run as that Admin user. Otherwise, the tool will fail with messages similar to these:
kCGErrorIllegalArgument : initCGDisplayState: cannot map display interlocks.
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
Whether done from the Finder or the indexfolder tool, content indexing creates a folder named .FBCIndex either in the folder to be indexed or in one of its parent folders.