Trying to configure stunnel to execute althttpd to execute cgi in general, fossil specifically
-First for the confused searchers, the forground option in stunnel4 doesn't seem to work. However you can get a way to debug with the "debug = 7", and specifying the log file with "output =", and realizing that the log file is relative to the chroot. I just took out the chroot option for now. [https] accept = 443 TIMEOUTclose = 0 exec = /usr/local/bin/althttpd execargs = /usr/local/bin/althttpd -logfile althttpd.log -root /var/repositories -user www-data -https 1 Now I'm onto debugging althttpd. A normal html file works. 2011-12-28 22:39:26 127.0.0.1 http://www.thomasstover.com/index.html * 200 403 208 0 0 0 0 0 1 Mozilla/5.0_(Windows_NT_6.0;_WOW64;_rv:8.0)_Gecko/20100101_Firefox/8.0 * Next a hello world cgi c program. Not sure what the numbers mean, but nothing happens. 2011-12-28 22:39:47 127.0.0.1 http://www.thomasstover.com/helloworld * 350 0 0 0 0 0 0 1 Mozilla/5.0_(Windows_NT_6.0;_WOW64;_rv:8.0)_Gecko/20100101_Firefox/8.0 * And a #! fossil cgi wrapper. no dice. 2011-12-28 22:53:16 127.0.0.1 http://www.thomasstover.com/fossiltestdjust * 364 0 0 0 0 0 0 1 Mozilla/5.0_(Windows_NT_6.0;_WOW64;_rv:8.0)_Gecko/20100101_Firefox/8.0 * Then I realized I'm getting hit with the chroot semantics again - wrapper script paths etc. ... and that also means libraries. So I rebuilt the helloworld with static linkage #include <stdio.h> int main(void) { printf("Content-Type: text/plain;charset=us-ascii\n\n"); printf("Hello world\n\n"); return 0; } gcc helloworld.c -static -o helloworld Which now does at least print hello world in the browser! Although it acts like it is waiting for more output, then stops after several seconds. 2011-12-29 00:11:09 127.0.0.1 http://www.thomasstover.com/helloworld * 200 350 137 0 0 0 0 0 1 Mozilla/5.0_(Windows_NT_6.0;_WOW64;_rv:8.0)_Gecko/20100101_Firefox/8.0 * So do I now need to build fossil with static linkage to the libc, or have I wondered into the woods? Also note that the -https 1 args still show http in the log file. Thanks for any help. I'll try to make some more comprehensive notes when I get it cooking. www.thomasstover.com _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

