ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaie_5.4.0.1/rzaiesetsearch.htm

215 lines
14 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="topic" />
<meta name="DC.Title" content="Set up the Webserver search engine on HTTP Server (powered by Apache)" />
<meta name="abstract" content="This topic provides information about how to set up the Webserver search engine for your HTTP Server with the IBM Web Administration for i5/OS interface." />
<meta name="description" content="This topic provides information about how to set up the Webserver search engine for your HTTP Server with the IBM Web Administration for i5/OS interface." />
<meta name="DC.Relation" scheme="URI" content="rzaieparsearch.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaiesetsearch" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Set up the Webserver search engine on HTTP Server (powered by Apache)</title>
</head>
<body id="rzaiesetsearch"><a name="rzaiesetsearch"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Set up the Webserver search engine on HTTP Server (powered by Apache)</h1>
<div><p>This topic provides information about how to set up the Webserver
search engine for your HTTP Server with the <span>IBM<sup>®</sup> Web Administration for i5/OS™ interface</span>.</p>
<div class="important"><span class="importanttitle">Important:</span> Information
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
It is recommended that you install the latest PTFs to upgrade to the latest
level of the HTTP Server for i5/OS. Some of the topics documented here are
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
<p>The Webserver search engine allows you to perform full text searches on
HTML and text files. You an control what options are available to the user
and how the search results are displayed through customized Net.Data<sup>®</sup> macros.</p>
<p>Follow these steps to configure the Webserver search engine for HTTP Server
(powered by Apache) using the <span>IBM Web Administration for i5/OS interface</span>. </p>
<div class="section"><h4 class="sectiontitle">Edit HTTP Server (powered by Apache)</h4><ol><li>Click the <strong>Manage</strong> tab. </li>
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
</li>
<li>Select <strong>Global configuration</strong> from the <strong>Server area</strong> list. </li>
<li>Expand <strong>HTTP Tasks and Wizards</strong>. </li>
<li>Click <strong>Add a directory to the Web</strong>.<p>Using the wizard, create a
new directory to serve static Web content, with directory <strong>/www/<em>MyServer</em>/scripts/</strong>,
and with an alias <strong>/scripts/</strong>, where <em><strong>MyServer</strong></em> is the name
of your HTTP Server (powered by Apache). See <a href="rzaiejklnewdir.htm">JKL Toy Company adds a new directory to HTTP Server (powered by Apache)</a> for more information.</p>
<div class="note"><span class="notetitle">Note:</span> The new scripts directory
and the directory containing the files to be searched must have *Public *RX
authority or Net.data will return an error.</div>
</li>
<li>Expand <strong>Server Properties</strong>. </li>
<li>Click <strong>Container Management</strong>. </li>
<li>Click the <strong>Directories</strong> tab in the form. </li>
<li>Click <strong>Add</strong> under the <strong>Directory/Directory Match container</strong> table.
</li>
<li>Select <strong>Directory</strong> from the list in the <strong>Type</strong> column. </li>
<li>Enter <strong>/QSYS.LIB/QHTTPSVR.LIB/</strong> in the <strong>Directory path or expression</strong> column.
</li>
<li>Click <strong>Continue</strong>. </li>
<li>Click <strong>OK</strong>. </li>
<li>Click <strong>URL Mapping</strong>. </li>
<li>Click the <strong>Aliases</strong> tab in the form. </li>
<li>Click <strong>Add</strong> under the <strong>URL to host file system mappings</strong> table.
</li>
<li>Select <strong>Alias</strong> from the list in the <strong>Alias Type</strong> column. </li>
<li>Enter <strong>/htdocs/</strong> in the <strong>URL path</strong> column. </li>
<li>Enter <strong>/www/<em>MyServer</em>/htdocs</strong> in the <strong>Host directory or file</strong> column,
where <strong><em>MyServer</em></strong> is the name of your HTTP Server (powered by Apache).
</li>
<li>Click <strong>Add</strong>. </li>
<li>Select <strong>ScriptAlias</strong> from the list in the <strong>Alias Type</strong> column.
</li>
<li>Enter <strong>/cgi-bin/db2www/</strong> in the <strong>URL path</strong> column. </li>
<li>Enter <strong>/QSYS.LIB/QHTTPSVR.LIB/DB2WWW.PGM/</strong> in the <strong>Host directory
or file</strong> column. </li>
<li>Click <strong>Continue</strong>. </li>
<li>Click <strong>OK</strong>. </li>
<li>Select <strong>Directory \www\<em>MyServer</em>\scripts\</strong> from the <strong>Server
area list</strong>, where <em><strong>MyServer</strong></em> is the name of your HTTP Server
(powered by Apache). </li>
<li>Click <strong>Dynamic Content and CGI</strong>. </li>
<li>Click the <strong>General Settings</strong> tab in the form. </li>
<li>Select <strong>Enabled</strong> for <strong>Allow CGI programs to be run</strong>. </li>
<li>Click <strong>OK</strong>. </li>
<li>Click <strong>Security</strong>. </li>
<li>Click the <strong>Control Access</strong> tab in the form. </li>
<li>Select <strong>All authenticated users (valid user name and password)</strong> under <strong>Control
access based on who is making the request</strong>. </li>
<li>Select <strong>Allow then deny</strong> from <strong>Order for evaluating access</strong> under <strong>Control
access based on where the request is coming from</strong>. </li>
<li>Select <strong>All client hosts</strong> under <strong>Client hosts allowed access to
this resource</strong>. </li>
<li>Click <strong>OK</strong>. </li>
<li>Select <strong>Directory /QSYS.LIB/QHTTPSVR.LIB/</strong> from the <strong>Server area</strong> list.
</li>
<li>Click <strong>Dynamic Content</strong> and CGI. </li>
<li>Click the <strong>General Settings</strong> tab in the form. </li>
<li>Select <strong>Enabled</strong> for <strong>Allow CGI programs to be run</strong>. </li>
<li>Click <strong>OK</strong>. </li>
<li>Click <strong>Security</strong>. </li>
<li>Click the <strong>Control Access</strong> tab in the form. </li>
<li>Select <strong>All authenticated users (valid user name and password)</strong> under <strong>Control
access based on who is making the request</strong>. </li>
<li>Select <strong>Allow then deny</strong> from <strong>Order for evaluating access</strong> under <strong>Control
access bade on where the request is coming from</strong>. </li>
<li>Select <strong>All client hosts</strong> under <strong>Client hosts allowed access to
this resource</strong>. </li>
<li>Click <strong>OK</strong>. </li>
</ol>
</div>
<div class="section"><h4 class="sectiontitle">Create search index</h4><ol><li>Click the <strong>Advanced</strong> tab.</li>
<li>Click the <span class="uicontrol">Search Setup</span> subtab.</li>
<li>Expand <strong>Search Engine Setup</strong>. </li>
<li>Click <strong>Create search index</strong>. </li>
<li>Enter an index name in the <strong>Index name</strong> field. </li>
<li>Click <strong>Apply</strong>. </li>
<li>Select <strong>Build a document list from this directory</strong> under <strong>Document
list</strong>. </li>
<li>Enter the directory where the HTML and text files to searched are located.
Example,<strong> /www/<em>MyServer</em>/htdocs</strong>, where <strong><em>MyServer</em></strong> is
the configuration directory of your HTTP Server (powered by Apache). </li>
<li>Select <strong>Create a mapping rules file from this HTTP server</strong> under <strong>Mapping
rules</strong>. </li>
<li>Select your HTTP Server (powered by Apache) configuration name from the
list. </li>
<li>Enter a URL prefix in the <strong>Prefix to use for URL address field</strong>.
Example, <strong>http://<em>iSeries™</em>:<em>Port</em></strong>, where <strong><em>iSeries</em></strong>:<strong><em>Port</em></strong> is
the name of your iSeries and port number. <div class="note"><span class="notetitle">Note:</span> Remember the search index
name and mapping rules directory and file name. This information will be used
in the following steps.</div>
</li>
<li>Click <strong>Apply</strong>.</li>
</ol>
</div>
<div class="section"><h4 class="sectiontitle">Copy sample_search.ndm and sample_html.html files</h4><ol><li>Open directory <strong>\QIBM\ProdData\HTTP\Public\HTTPSVR</strong>. </li>
<li>Copy <strong>sample_html.html</strong> to <strong>\www\<em>MyServer</em>\htdocs</strong> directory,
where <strong><em>MyServer</em></strong> is the configuration directory of your HTTP Server
(powered by Apache). </li>
<li>Copy <strong>sample_search.ndm</strong> to <strong>\www\<em>MyServer</em>\scripts</strong> directory,
where <strong><em>MyServer</em></strong> is the configuration directory of your HTTP Server
(powered by Apache). </li>
</ol>
<div class="note"><span class="notetitle">Note:</span> File sample_search.ndm must have *Public *RX authority or Net.data
will return an error.</div>
</div>
<div class="section"><h4 class="sectiontitle">Edit sample_search.ndm</h4><ol><li>Open <strong>sample_search.ndm</strong> with a text editor. </li>
<li>Change the following lines found under <strong>%{ ---- STEP 1 -----%}</strong>: <dl><dt class="dlterm">idxIndexName="Recipes"</dt>
<dd>Search index name: replace <strong>Recipes</strong> with the name of your search
index. </dd>
</dl>
<dl><dt class="dlterm">mapFile="" </dt>
<dd>Map file directory and name: add <strong>/QIBM/UserData/HTTPSVR/index/<em>SearchIndex</em>.MAP_FILE</strong>,
where <strong><em>SearchIndex</em></strong> is the name of your search index.</dd>
</dl>
</li>
<li>Save and close the file. </li>
</ol>
<div class="note"><span class="notetitle">Note:</span> The sample_search.ndm file has additional fields that allow you
to modify the search results displayed with the Webserver search engine. Read
the documentation provided in the sample_search.ndm file for more details.</div>
</div>
<div class="section"><h4 class="sectiontitle">Edit sample_html.html</h4><ol><li>Open <strong>sample_html.html</strong> with a text editor. </li>
<li>Change the following lines: <dl><dt class="dlterm">FORM NAME="search" ACTION="/cgi-bin/db2www/qibm/proddata/http/public/httpsvr/sample_search.ndm/output"
METHOD="post"&gt; </dt>
<dd>Replace the <strong>ACTION</strong> attribute value with <strong>/cgi-bin/db2www/www/<em>MyServer</em>/scripts/sample_search.ndm/output</strong>,
where <strong><em>MyServer</em></strong> is the configuration directory of your HTTP Server
(powered by Apache) </dd>
</dl>
<dl><dt class="dlterm">&lt;INPUT TYPE="hidden" NAME="frmIndexName" VALUE="Recipes"&gt;</dt>
<dd>Search index name: replace <strong>Recipes</strong> with the name of your search
index. </dd>
</dl>
<dl><dt class="dlterm">&lt;INPUT TYPE="hidden" NAME="frmMapFile" VALUE=" "&gt;</dt>
<dd>Map file directory and name: add <strong>/QIBM/UserData/HTTPSVR/index/SearchIndex.MAP_FILE</strong> to
the <strong>VALUE</strong> attribute, where <strong><em>SearchIndex</em></strong> is the name of
your search index.</dd>
</dl>
</li>
<li>Save and close the file. </li>
</ol>
<div class="note"><span class="notetitle">Note:</span> The sample_html.html file contains additional fields for the Webserver
search engine. Only the necessary information for the required fields are
documented here.</div>
</div>
<div class="section"><h4 class="sectiontitle">Start the server</h4><ol><li>Click the <strong>Manage</strong> tab. </li>
<li>Click the <span class="uicontrol">All Servers</span> subtab.</li>
<li>Click the <span class="uicontrol">All HTTP Servers</span> tab.</li>
<li>Select your HTTP Server (powered by Apache) from the table.</li>
<li>Click <strong>Start</strong>. </li>
</ol>
</div>
<div class="section"><h4 class="sectiontitle">Test the Webserver search engine</h4><ol><li>Open a Web browser. </li>
<li>Enter <strong>http://<em>iSeries:Port</em>/sample_html.html</strong> to start the
Webserver search engine, where <strong><em>iSeries:Port</em></strong> is the name of your
iSeries and port number. </li>
<li>Enter a search term. </li>
<li>Click <strong>Search</strong>. </li>
</ol>
<div class="note"><span class="notetitle">Note:</span> If the MAP_FILE is incorrectly built, the search results will not
contain the correct URL and the Web page will not be displayed.</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaieparsearch.htm" title="This topic provides step-by-step tasks for the Webserver search engine.">Search tasks</a></div>
</div>
</div>
</body>
</html>