From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net Date: Sat, 18 Apr 2009 20:59:14 -0400 From: john@csplan9.rit.edu In-Reply-To: <5d375e920904181600v57dbb0d8s83101a610daf336c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] web server Topicbox-Message-UUID: e8161ff0-ead4-11e9-9d60-3106f5b1d025 >> So, how hard is it to get werc running on real Plan 9? The readme was >> for Plan 9 Ports last time I checked. > > Shouldn't be hard, aside from a couple of paths that might need fixing > (perhaps using bind(1) will do), it should run out of the box. > > The only issue is that it expects to run as a CGI, so you will need to > either use pegasus or some adapter for the standard httpd, there is a > fancy one in russ' contrib dir, but a shell script that sets the two > or three CGI vars werc uses should probably be enough, and I think > somebody did just that. > > Hopefully somebody will write a more detailed howto, patches and docs welcome ;) > > Peace > > uriel Ok, so I'm probably being really dumb here, but I'm trying to get CGI to work and not quite sure what I need to do. I stuck cgi.c in the httpd source directory, compiled and installed; now I have /bin/ip/httpd/cgi. I created /bin/ip/httpd/cgi-bin and stuck a rc script ("foo") in there that says "Hello world". Now, from my probably flawed reading of the cgi source, I thought I'd just do: http://myserver/magic/cgi/foo to run my script 'foo'. However... nothing. Don't even get an error, just a blank page. Am I missing something? This intersects a few areas that I don't know much about--the Plan 9 httpd server, and how cgi stuff works in general. John Floren