[Prev]

2.2.3 Accessing ZXID

Edit your /etc/hosts file so that the definition of localhost also includes sp1.zxidcommon.org and sp1.zxidsp.org domain names, e.g:

  127.0.0.1       localhost sp1.zxidcommon.org sp1.zxidsp.org

Point your browser to

https://sp1.zxidsp.org:8443/zxid

or if you do not want the common domain cookie check

https://sp1.zxidsp.org:8443/zxid?o=E

Dynamic linking problems

If accessing the URL (while running mini_httpd) you get no error message and no content - everything just mysteriously fails - you may be hitting a dynamic linking problem. If mini_httpd(8) fails to launch CGI script it will silently fail. This is unfortunate, but I guess that is what the "mini" in the name implies.

To make matters even worse, mini_httpd(8), probably in the interest of security, will ignore LD_LIBRARY_PATH variable. Apparently it has its fixed notion of the library paths that is set at compile time.

If you suspect this problem, try following:

  1. Create shell script called test.sh:

         #!/bin/sh
         echo Content-Type: text/plain
         echo
         echo Test $$
         echo lib_path is --$LD_LIBRARY_PATH--
         ldd zxid
         ./zxid -h 2>&1
         echo Exit value --$?--
  2. Restart mini_httpd(8) like this

         chmod a+x test.sh
         mini_httpd -p 8443 -c test.sh -S -E zxid.pem -l mini.out
  3. Access https://sp1.zxidsp.org:8443/test.sh - you may see something like

         Test 1655
         lib_path is --/usr/local/lib:/usr/lib--
         ./zxid: error while loading shared libraries: libcurl.so.3: cannot
             open shared object file: No such file or directory

    Now you at least see why it's failing (in this case the directory where libcurl was installed is not in mini_httpd's notion of LD_LIBRARY_PATH). If the zxid binary runs fine from comman line, try `ldd zxid' to see where it is finding its libraries.

Easiest dirty fix is to copy the missing libraries to one of the hardwired directories of mini_httpd(8) (e.g. /usr/lib). More sophisticated fixes include using ldconfig(8), recompiling your mini_httpd(8), or statically linking the offending library into zxid binary.


[Prev | Next]