Blue Reef Technical Support Blue Reef Virtual Server Reseller ProgramInstallation instructions, manuals, how-tos, and more!About Blue Reef Consulting, Inc.

About Blue Reef Virtual ServersEcommerce Solutions for your Virtual ServerSearch the Blue Reef Virtual Server web site
Return to Blue Reef Virtual Servers Home Page
Order virtual servers, software, computers, and more!
Return to Blue Reef Main Home Page
Specials
Site Map
CGi Library of scripts to help you do business with your Virtual Serve and to have a better web site.



Blue Reef Virtual Servers
Virtual Server Support
Virtual Server Addons
CGI Library for use with a Virtual Server
CGI Library Overview
FormMail
PGP FormMail
Simple Visitor Counter
Count 2.5 Visitor Counter
Guestlist
User Information (Finger)
Password-protect files with User Authentication
URL Redirection
Tool to Check Domain Name Availability
Lookup details for domain records
Domain Record Modification Tools
Excite Search Engine for your site
SWISH-E search engine for your site
JavaScript Library
Java Library
Request help using our Problem Tracking System
Order a Blue Reef Virtual Server now!


SWISH-E

Powered by SWISH-E A convenient method to allow clients to retrieve information from a web site is by building an index of the web pages and providing search capability. This may seem like a daunting task, but with a few tools this task becomes very easy.

Normally web indexing and searching requires a complex, hard to use and install WAIS-based solution, however a small yet powerful program SWISH-E, (which is based on SWISH written by Kevin Hughes), can be used to fulfill your web indexing and searching needs.

Installing and configuring SWISH-E
To install SWISH-E on your Virtual Server do the following:
  1. Telnet or SSH to your Virtual Server.
  2. At a command prompt type:

      % cd (this will put you in your home directory)

  3. Then untar the swish-e tar file we have prepared for you, type:

      % tar -xvf /usr/local/contrib/swish-e.tar
Create a SWISH-E index of your site
  1. Change your current working directory to your swish directory, type:

      % cd ~/usr/local/swish-e

  2. Create a SWISH-E configuration file for your Virtual Server. Save this file under the name of "website.conf" (or some other name of your liking) and then store this file in your ~/usr/local/swish-e directory. You will find a default configuration file in the ~/usr/local/swish-e directory, "swish.conf", which you can use as a template (just make sure you change all occurrences of LOGIN_NAME to match the login name of your Virtual Server).

    PLEASE NOTE: You should be very familiar with the FileRules section of the configuration file. By default, SWISH-E will not index files in directories containing a ".htaccess" file. If you have a directory that contains a ".htaccess" file, and would like it indexed- comment out that FileRules line by placing a "#" as the first character in the line.

  3. Run SWISH-E. Type:

      % cd ~/usr/local/swish-e
      % ./swish-e -c CONFIG_FILE


    Where CONFIG_FILE is the name of your SWISH-E configuration file you created in the previous step.

    After you run the SWISH-E executable, a SWISH-E index file will be generated. The name of the SWISH-E index file is that which you specified as the value for the IndexFile variable in the SWISH-E configuration file.
HTML Source for the Search Form
The HTML source below represents a sample search form. This form can be customized for your Virtual Server by simply changing the occurrence of SWISH_INDEX_FILE to the name of the swish-e index which you specified as the value for the IndexFile variable in the SWISH-E configuration file.
    <html>
    <head>
    <title>Search Swish Index</title>
    </head>
    <body>
    <h1>Search Swish Index</h1>
    <form method="GET" action="/cgi-bin/Scriptorium/searchindex/query.pl">
    <!-- want to mimic "swish -f swishindex -w keywords -m maxresults" -->
    <input type="hidden" name="swishindex" value="/usr/local/swish-e/SWISH_INDEX_FILE"> <b>Search for the following keywords:</b>
    <br>
    <input name="keywords" size=40 maxlength=512> <p> &#160; &#160;
    <input type=radio name=detail value=yes CHECKED>
    <b>Verbose report</b>
    &#160; &#160; <input type=radio name=detail value=no>
    <b>Simple report</b>
    <p>
    <b>Maximum number of results:</b>
    <Br>
    <input name="maxresults" size=5 value=40 maxlength=64>
    <p>
    <input type="submit" value="Search">
    <input type="reset" value="Reset">
    <p>
    <p>
    search example 1: john and doe or jane<Br> search example 2: john and (doe or Jane)<Br> search example 3: not (john or Jane) & doe<Br>
    search example 4: j* and doe<Br> <p>
    </form>
    </body>
    </html>
You may hide the "maxresults" edit field by simply using a "type=hidden" argument with the input tag.

If you are unfamiliar with the FORM HTML element, or would like to learn more about forms, see Mosaic for X version 2.0 Fill-Out Form Support.

Install the Search CGI
To install the search form on your Virtual Server you will need to do the following:
  1. Download the Search Form
    You will need to download the Search Form HTML source and store it somewhere in your "usr/local/etc/httpd/htdocs" directory structure. Feel free to customize the form, add graphics, etc. But be sure that the variable name for each input field is not altered.

  2. Untar the Simple Search CGI source code
    The CGI source code for the search form was installed when you created your SWISH-E index file. To extract only the CGI scripts from the swish-e tar archive, perform the following commands:

    1. Telnet or SSH to your Virtual Server.
    2. Change directories to your home directory (type "cd" and hit return)
    3. Type "tar -xvf /usr/local/contrib/swish-e.tar [path]"

      Where the value of "[path]" is "usr/local/etc/httpd/cgi-bin/Scriptorium".
      This will only install the query.pl and util.pl file into your "www/cgi-bin/Scriptorium/searchindex" directory.

  3. Customize the Appearance of the Search CGI
    Two subroutines in the util.pl file are used to print out header and footer information. These functions are print_header_info and print_footer_info. Feel free to modify these functions such that the CGI outputs pages that are in synch with the motifs of the rest of your site.
SWISH-E Documentation
SEE ALSO:

Installing CGI Scripts

CGI Security Issues

CGI Scriptorium

About Perl

Perl Modules

Server Side Includes

Mime Types

About Apache Server

BOOKS TO HELP YOU:

CGI Programming 101
CGI Programming 101

$24.95

CGI Programming With Perl
CGI Programming With Perl

$26.36

PGP: Pretty Good Privacy
PGP:
Pretty Good Privacy

$27.96


Web Security:
A Step-by-Step Reference Guide

$23.96


Official Guide to Programming With CGI.pm
Official Guide to Programming With CGI.pm

$27.99

Javascript Bible
Javascript Bible,
3rd Edition

$34.99

Core Web Programming
Core Web Programming

$34.39

Apache: Web Server Directives Guidebook Apache:
Web Server Directives Guidebook

$15.95

Amazon.com logo
Search for :
Enter keywords...