Re: [fossil-users] Using althttpd.c
On Thu, Nov 10, 2011 at 10:57 PM, Paolo Bolzoni ezzet...@hotmail.comwrote: So I downloaded it, compiled it, copied in /usr/local/bin/httpd . server = /usr/bin/httpd Those dirs don't match. a.txt a text file b.sh a script with this content: - #!/bin/sh echo A - A CGI script will cause a internal server error if it does not output proper HTTP headers (each line terminated by CRNL, not just NL), followed by CRNL (empty line). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Using althttpd.c
Today I tried to use althttpd.c as HTTP server for serving few fossil scm. But I cannot execute CGI scripts. The althttpd.c file I am speaking of is this one: http://www.sqlite.org/docsrc/artifact/14c9965da19e83baeba2cd81b6459f3948f73794 So I downloaded it, compiled it, copied in /usr/local/bin/httpd . My distribution uses xinetd so I made a configuration file to start httpd. Here is the configuration file content: service http { socket_type = stream protocol = tcp port = 80 wait = no user = root group = root server = /usr/bin/httpd server_args = -logfile logfile -root /home/paolo/tmp -user nobody } I set the root directory as /home/paolo/tmp just as test. Inside the directory /home/paolo/tmp/default.website are two files: a.txt a text file b.sh a script with this content: - #!/bin/sh echo A - Now once I start xinetd if I go to 127.0.0.1 with my browser the server greets me saying there is no document in / that is fine. Also 127.0.0.1/a.txt works fine, but if I try 127.0.0.1/b.sh the page loads for some seconds and it shows an empty page. What I am doing wrong? Why the CGI does not work? I thought if could be a problem with the root jail but even if I copy sh in the default.website directory and change the interpreter to #!/sh nothing changes. Help please. Thanks ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Using althttpd.c
Hello, On Thu, 10 Nov 2011 22:57:37 +0100 Paolo Bolzoni ezzet...@hotmail.com wrote: I thought if could be a problem with the root jail but even if I copy sh in the default.website directory and change the interpreter to #!/sh nothing changes. Are you sure that 'sh' doesn't depend on anything else and is statically linked? Try with statically linked fossil: ./configure --static make -- Dmitry Chestnykh http://www.codingrobots.com ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Using althttpd.c
On Thu, Nov 10, 2011 at 10:57:37PM +0100, Paolo Bolzoni wrote: Today I tried to use althttpd.c as HTTP server for serving few fossil scm. But I cannot execute CGI scripts. [...] Now once I start xinetd if I go to 127.0.0.1 with my browser the server greets me saying there is no document in / that is fine. [...] Is there any reason not to run fossil directly from inetd to serve a directory with repositories? Fossil is really self-hosting and does not need a HTTP server because it's itself a HTTP server. For instance, I have: ~% grep fossil /etc/inetd.conf 8080 stream tcp nowait fossil /usr/local/bin/fossil /usr/local/bin/fossil http /var/local/lib/fossil/ That /var/local/lib/fossil/ directory contains a set of *.fossil files. This allows me to use http://that_host:8080/repo/ to acces the repo.fossil repository. This works for both kinds of access: using fossil client for pushes/pulls and using a browser for interactive stuff. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users