On Thu, Jun 17, 2010 at 5:49 PM, Ross Berteig <r...@cheshireeng.com> wrote:
> > So I got thttpd built and running on the DNS-323, and set it up > so that fossil can be run via a simple CGI naming a specific > repository. Now my URLs look like > http://192.168.1.150:8080/r.cgi/example/index assuming that > r.cgi points to a directory containing example.fossil. However, > when I fetch that page, all of the links it contains are missing > the port number. It is also unstyled and missing its logo > because those links too are missing the port number. > > Any thoughts? > I think this is a case of thttpd not setting up the HTTP_HOST environment variable correctly. When I run CGI using apache on port 8080, it works just fine: http://www.sqlite.org:8080/cgi-bin/mailman/fossil/test_env The cgi-bin I'm using above is the same apache that runs the mailman interface for SQLite and Fossil. As you can see from the "test_env" screen, the HTTP_HOST environment variable includes the port number. I'm guessing thttpd omits the port number. That would be a mistake on the part of thttpd, if I'm not badly mistaken. Fossil expects to find the TCP port number on the end of the HTTP_HOST environment variable and if it doesn't find it there, it assumes port 80. One of the backup webservers for Fossil is Hurricane Electric - a virtual host running apache, but on port 80 instead of 8080. See http://www.hwaci.com/cgi-bin/fossil/test_env As you can tell in this later link, HTTP_HOST omits the port number when the port number is 80. If you want a simple webserver for your DNS-323, consider running althttpd - the HTTP server used by www.fossil-scm.org and www.sqlite.org. The source code is a single file of C located here: http://www.sqlite.org/docsrc/artifact/d53e8146bf7977fea1df95e2e9e194ca55268ce0 Instructions on how to set it up and use it are contained in comments at the beginning of the source file. It supports multiple domains on the same IP address. I'm currently hosting 19 different domains on a single Linode 1024 (a 1/24th virtual slice of an actual server) including sqlite.org and fossil-scm.org. It easily handles 10GB of traffic and 280K hits per day with around 3% CPU utilization. And, althttpd correctly sets up the HTTP_HOST environment variable for CGI so that it works correctly with Fossil even on a non-standard port. -- --------------------- D. Richard Hipp d...@sqlite.org
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users