Skip to main content.
home | support | download

Back to List Archive

swish-e 2.4.3 windows 2003 iis success!

From: Revillini, James <JRevillini(at)not-real.txcc.commnet.edu>
Date: Tue Jun 21 2005 - 17:16:56 GMT
I'm writing with a success story / recipe for success on a windows 2003
box.  In this example, I am indexing a NETWORK FOLDER of word doc files
and pdfs and then running the search through a browser.

- install the latest version of activeperl from
http://activeperl.com/Products/Download/Download.plex?id=ActivePerl - I
am using version 5.8.7.813 

I installed perl to e:\perl\

- download and install swish-e from http://www.swish-e.org/download - I
grabbed swish-e-2.4.3-win32.exe and installed it to e:\swish-e\

- index something - in my case, I was trying to index a network drive
that had thousands of word and pdf docs on it.
 - create a text file in e:\swish-e\ called swish-e.config
 - the text file needs only 2 lines that read:

       IndexDir z:/
	 ReplaceRules replace "z\:/" "file\://///server/folder/"

   (replace "z:/" with the mapped network drive and path - as far as I
know, the drive must be mapped or the indexer fails; *note: use the
forward slashes!  Also, replace "server" with the network server name or
ip address and replace "folder/" with whatever path you need to access
the files. The only backslashes used are there to escape the colon
characters)

 - go to the command line and go to the install path for swish-e
(e:\swish-e\)
 - type swish-e -c swish-e.config -S fs
 - the installer should run without problems (if you have problems, see
http://swish-e.org/docs/swish.cgi.html and read every last word of
http://swish-e.org/docs/swish.cgi.html#debugging)


- set up your search directory
 - create a directory on e: called "search"
 - copy into this directory the following files:
      e:\swish-e\swish.cgi
	e:\swish-e\index.swish-e
	e:\swish-e\index.swish-e.prop
 - create a file in e:\search\ called .swishcgi.conf
 - insert the following text into that file

   return {
        swish_binary    => 'e:\\swish-e\\swish-e.exe',
        swish_index     => 'e:\\search\\index.swish-e',
        name_labels => {
            swishdefault        => 'Search All',
            swishtitle          => 'Title',
            swishrank           => 'Rank',
            swishlastmodified   => 'Last Modified Date',
            swishdocpath        => 'Document Path',
            swishdocsize        => 'Document Size',
        },

    };


 - save and close the file
 - in windows explorer, make sure e:\search has the IUSR with
read&execute permissions


- create a web site just for running the search in IIS
 - open iis
 - expand the server node
 - right-click websites>new>website...
 - call it "search", click next
 - assign it to TCP port 85 (or something unused - I'll assume 85 for
this example), click next
 - enter a path of "e:\search\", click next
 - click next (just leave read and run scripts checked)
 - click finish

- setting up perl [PROPERLY] in IIS (this tripped me up because I
thought I knew what I was doing from windows 2000, but there are a few
additional steps in windows 2003 server):
 - open iis
 - expand the server node
 - click on web service extensions
 - select Perl CGI Filter and click allow if it is not already "allowed"
 - select Perl ISAPI Filter and click allow if it is not already
"allowed"
 - expand the web sites node in the left panel
 - right click the "search" website you just created
 - click the home directory tab
 - click configuration...
 - click the "add" button
 - path to executable is e:\perl\bin\perl.exe "%s" %s
 - extension is .cgi
 - select "limit verbs to" and enter POST,HEAD,GET
 - click OK - if you get an error about cgi already being defined,
you're probably all set with perl already BUT CHECK TO MAKE SURE YOU'RE
ACTUALLY POINTING TO PERL.EXE; for some reason, I was only able to get
this to work using the perl.exe binary - I tried and tried to get the
ISAPI file (e:\perl\bin\perlis.dll) going instead but to no avail


Now you should be able to point a browser to
http://webserver:85/swish.cgi where "webserver" is your server name.





I hope this helps someone out there get started.  It's great once you
get it working, but I ran into some very weird windows-related stumbling
blocks along the way and had to read through many, many email archive
issues that did not even appear to be on the same topic in order to
configure this correctly on Windows 2003.  I hope to write another
message with some of the errors I ran into and how to correct them.  In
the meantime, I'll try to answer any questions or run test scenarios as
time permits in order to help debug some other installations.

-Jim
Received on Tue Jun 21 10:16:57 2005