Forum OpenACS Q&A: aolserver + nscgi

Collapse
Posted by finn knudsen on
Hi

Does anybody have any experience with configuring aolserver so you can
run your old perl cgi scripts.

I have set the configuration files, and the perl script gets parsed,
but there is no output returned to the client.

Any thoughts would be creatly appreciated.

Regards

Finn

Collapse
Posted by Don Baccus on
opennsd.org is a better place to ask this question.  I've seen enough questions to convince me that folks have problems getting nscgi up and  running, but I've never used it myself so don't have any answers handy.  There may be folks here who do, but the odds are higher of getting an answer at the other site...
Collapse
Posted by Andrew Piskorski on
I just turned nscgi on and it worked for some old C (!) cgi programs.
I know others have set it up to use for cvsweb, which is perl.
Unfortunately, in my very limited use of nscgi, I've never had any
problems at all, so I'm can't offer much help or advice.
Collapse
Posted by Henry Minsky on
Here is what's in my aolserver config file. It seems to run cgi files OK from the /cgi-bin directory specified. I have tried Perl and Shell scripts, with the extensions ".pl" and ".doit" Make sure your Perl script outputs at least some kind of Content-type header, or else certain web browsers won't display the content. AOLserver will add in content-length and a couple of other headers automatically.


ns_section "ns/server/${server}/modules" 
        ns_param   nssock          ${bindir}/nssock.so 
        ns_param   nslog            ${bindir}/nslog.so 
        ns_param   nscgi           ${bindir}/nscgi.so 

ns_section "ns/server/${server}/module/nscgi" 
       ns_param   map "GET  /cgi-bin /web/$server/cgi-bin"
       ns_param   map "POST /cgi-bin /web/$server/cgi-bin" 
       ns_param   Interps CGIinterps

ns_section "ns/interps/CGIinterps" 
       ns_param .pl "/usr/bin/perl"
       ns_param .doit "/bin/bash"
Collapse
Posted by finn knudsen on
Hi

Just wanted to tell you all that I got things working after I got this mail from Patrick

--Are you explicitly setting the Content-Type in your perl script?

--You usually need to be sure that the first line output is

--Content-Type: text/html

--

--
--followed by the actual HTML.

--Cordially

--Patrick Giagnocavo

Thanks alot for your help