PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Ubuntu 18.04 + nginx + fcgiwrap = 502

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ubuntu 18.04 + nginx + fcgiwrap = 502

    Hello -

    A big fan of Zoom Search, and using the PHP setup with great success at DadsWorksheets.com.

    I'm setting up a new site and just downloaded ZoomSearch 7.1 to try to see if I can get it working on a server configuration that doesn't have PHP, specifically 64-bit Ubuntu 18.04 with Nginx. I'm proxying CGI requests with fcgiwrap and that seems to be working fine; I can hit executable bash scripts in the cgi-bin directory I have setup just fine and they return output all the way to the browser.

    I've run Zoom and put the search.cgi script in the same location. When I attempt to hit that script, I get a 502 (bad gateway) error. If I remove the script, and retry the URL, I get a 403 (forbidden) which is as expected, but also makes me think that I'm proxying out to the search.cgi file just fine, it just can't be executed for some reason.

    I've verified that the search.cgi has exactly the same wild-card file permissions as my test bash script...

    -rwxrwxrwx 1 www-data www-data 534832 Jul 18 17:05 search.cgi

    ...and I made sure when I transferred the file to the server I didn't do any ASCII translation or anything weird on it.

    If I'm sitting in that directory and I run my shell script right there, I get the HTML output right there to the console. If I try running "./search.cgi" right there it returns "No such file or directory." I tried re-indexing and selecting the BSD option instead of Linux and used that search.cgi file instead; when I run that one at the console I get a core dump.

    I'm trying to figure out if I've got something weird setup wrong here, but I can't think of a rock I haven't turned over yet. I'm building the index files and getting the search.cgi file out using the Mac OS version of Zoom Search if that makes any difference.

    So I'm wondering if that search.cgi file is something that would work in the configuration I'm trying to setup.

    Any advice is hugely appreciated!

    Thanks in advance,

    Jim

  • #2
    Argh. So I've spent the better part of the afternoon working on this, and I suppose writing the message above helped me think through some other potential issues, like maybe that the search.cgi binary was 32-bit and maybe I didn't have 32 bit architecture support installed on this box, and sure enough this...

    sudo apt-get install libc6-i386

    ...got things working for me. Sorry for the false alarm, but hope this helps someone else in the same boat.

    Comment


    • #3
      You can pick the 64bit Linux CGI if you want to use 64bit.

      And there are even more versions to be found in this folder,
      C:\ProgramData\Wrensoft\Zoom Search Engine Indexer V7\scripts\CGI\

      For Windows the 32bit version of the CGI works fine on 64bit systems. So there should nearly never be the need to use the 64bit CGI on Windows.

      For Linux, the situation (as you discovered) is messy. 32bit Linux applications have problems with dealing with large files (>2GB) so if your set of index files is large you'll want to use the 64bit version, even if you got the 32bit release working.


      Click image for larger version

Name:	Zoom32bit.png
Views:	299
Size:	118.5 KB
ID:	34526

      Comment


      • #4

        Thanks... This site ultimately won't be more than a few hundred pages of modest size, so not terribly worried about the 32 bit performance.

        But that said, the MacOS version of the ZoomIndexer.app doesn't appear to include the option to select a 64 bit CGI...


        Click image for larger version

Name:	Screenshot 2018-07-19 03.38.51.png
Views:	263
Size:	177.0 KB
ID:	34543

        Comment


        • #5
          Just in case anyone needs to get at that 64-bit Linux CGI file in the meanwhile, if you find the ZoomIndexer.app in the Finder, Ctrl-Click on it and choose the "Show Package Contents" command from the popup menu. This will let you explore the application bundle in the Finder window. From there, if you expand the path Contents>Resources>LibraryFiles>scripts you'll find all the CGI binary variants.

          Comment


          • #6
            You're right, the 64-bit CGI option is missing from the Mac release at this point.

            And yes, that's a perfectly acceptable way to extract a copy of the 64-bit search.cgi from the package.

            We'll amend this in a future release.

            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment

            Working...
            X