Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#8 easier installation / configuration of web interface

open
nobody
2
2013-02-05
2006-11-15
Steve Rozen
No

Make it easier to set up the primer3 web interface on a new web server.

Discussion

  • Kumade Khawi
    Kumade Khawi
    2006-11-25

    Logged In: YES
    user_id=1653399
    Originator: NO

    To make installation easier, and help portability, I suggest we rely on only C and perl and move away from the standard unix programs. I see that the primer-web relies on three simple shell scripts to `cat` files to stdout. We can safely replace them with something like this:

    #!/usr/bin/perl

    print "Content-type: text/plain\n";
    print "\n";

    open (fh, "< drosophila.w.transposons.txt") || die "Can't open drosophila file";

    while (<fh>) {
    print $_;
    }

     
  • Steve Rozen
    Steve Rozen
    2006-11-27

    Logged In: YES
    user_id=1613302
    Originator: YES

    Good suggestion, that we should follow.

     
  • Kumade Khawi
    Kumade Khawi
    2006-12-02

    Logged In: YES
    user_id=1653399
    Originator: NO

    While still in the process of making a binary distribution of primer3-web, unfortunately nothing I tried so far seems promising, except maybe the heavy-weight web server route, like Apache.

    Tonight I tested both thttpd[1] and Cherokee[2]. Both are tiny itsy bitsy webservers that let you have html and cgi in less that 500k. Except that both suck. The thttpe I tried was a rogue win32 port someone did and it couldn't run my cgi-scripts. It was cute to see a webserve with such a small footprint, but it just couldn't run CGI. The second is Cherokee, a surprisingly simple webserver with a clean configuration process. Except it has a botched CGI mechanism that's best suited to PHP and a host of other message-board/blog scripting thinggies that I don't care for. It can only run CGI scripts if they're native binaries or they're know to the host OS. It doesn't use the win32 registry, and certainly not the Unix #! mechanism. I resorted to making primer3_results.cgi into a batch file, through Perl's pl2bat. I tried that because it DOES run batchfile CGI scripts, but it just doesn't get the second level of indirection associated with *scripts*. Needless to say, it didn't run the thinly veiled perl CGI script and I am back to square one.

    After so many "Internal Server Errors", I can safely delegate the process of primer + webserver + windows integration to someone else. We will pick the big three webservers and support them; Apache, IIS, and whatever is third these days. There is just no way we can have clean, portable, primer3 binaries that also support *any* webserver. Just can't happen.

    Maybe some kind of cheap GUI, like Perl/Tk or wxPerl or whatever.

    --
    [1]http://www.acme.com/software/thttpd/
    [2]http://www.cherokee-project.com/

     
  • Kumade Khawi
    Kumade Khawi
    2006-12-02

    Logged In: YES
    user_id=1653399
    Originator: NO

    Here are the two configuration files I wrote for the two tiny webservers. For now on I will be working on automatic installation targeting Apache, for now. Bundling a tiny webserver with primer is just not feasible, unless I find a better tiny web server than these two :-P

    In case someone can make these work, or if their developers improve CGI handling in the near future, we can use them.

    ---------------- primer-cherokee.conf

    Port 80
    Listen 127.0.0.1
    DocumentRoot C:/primer3-win

    DirectoryIndex input.html

    PidFile C:/primer3-win/cherokee.pid

    Log combined {
    AccessLog C:/primer3-win/cherokee.access
    ErrorLog C:/primer3-win/cherokee.error
    }

    Directory / {
    Handler common
    Allow from 127.0.0.1/8, 10.0.0.0/8, 172.16.0.0/8, 192.168.0.0/16
    }
    Directory /cgi-bin {
    Handler cgi
    DocumentRoot C:/primer3-win/cgi-bin
    }

    Extension cgi {
    Handler cgi {
    ScriptAlias C:/Perl/bin/perl.exe
    ErrorHandler On
    }
    }

    Extension bat {
    Handler cgi {
    }
    }

    ---------------- primer-thttpd.conf

    # This section overrides defaults
    dir=C:/primer3-win/
    #user=httpd# default = nobody
    logfile=C:/primer3-win/thttpd.log
    pidfile=C:/primer3-win/thttpd.pid
    # This section _documents_ defaults in effect
    port=80
    nosymlink# default = !chroot
    novhost
    nocgipat
    nothrottles
    host=127.0.0.1
    charset=iso-8859-1
    cgipat="/cgi-bin/"
    cgipath=C:/primer3-win/cgi-bin