Back to mnoGoSearch site

Running search.cgi from inetd/xinetd

Since version 3.3.7, it's possible to run search.cgi as inetd/xinetd service, without having to install HTTP server (such as Apache) on search machine.

To start using search.cgi on port 9999 please do the following:

  1. Add this line to /etc/services:

    
mnogosearch 9999/tcp
                

  2. In case of xinetd, create a new file with name mnogosearch with this content:

    
# default: on
    # description: The MNOGOSEARCH service allows remote users
    # to access the \
    #              mnoGoSearch search front-end without having
    # to run a \
    #              HTTP server
    service mnogosearch
    {
            disable = no
            port            = 9999
            socket_type     = stream
            wait            = no
            user            = root
            server          =  /usr/local/mnogosearch/bin/search.cgi
            server_args     = -x
            log_on_failure  += USERID
            protocol        = tcp
    }
                
    and put it into /etc/xinetd.d/.

    Or in case of inetd, add this line into /etc/inetd:

    
mnogosearch stream tcp nowait root /usr/local/mnogosearch/bin/search.cgi search.cgi -x
                

  3. Run "killall -HUP xinetd" or "killall -HUP inetd".

Now you can point your browser to http://hostname:9999/search.htm. The file name part in the URL tells search.cgi which template file to open. E.g. the above URL will tell search.cgi to open search.htm as its template.

Note: For security purposes you can also use a non-privileged user instead of "root" on step 2.

Note: You can choose another port instead of 9999. In this case change the port number on the steps 1 and 2 on your choice.