[thelist] perl and cgi-bin
Oren Levin
lists at pinetree.net
Sun Nov 16 23:00:44 CST 2008
Bob Meetin wrote:
> On all the sites where it is working cgi-bin is under webroot - i.e.
> /home/myaccount/www/cgi-bin
> Here it was sitting at /home/myaccount/cgi-bin. This wasn't about to
> work, so I created it under www.
Having your cgi-bin directory outside of the document root (www) is not
necessarily a problem. A "standard" installation of apache, for example,
is set up this way.
> I set up everything mimicing a site where I'd recently installed
> dadamail 3.0 (latest) but accessing mail.cgi displays a blank page. Not
> knowing too much about perl, I found a copy of hello world via google
> and placed it in the same folder, making it executable. All it does is
> display the contents of the file:
>
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
> print "<H1>Hello World</H1>\n";
>
> On my site it prints Hello World. So, I'm guessing that it's either a
> problem with perl or perhaps the path to perl. Other question, other
> than the fact that cgi-bin typically resides under www, is there
> anything particular about it?
Again, depending on how the server is set up, it may not allow execution
of any file under www. Try removing www/cgi-bin, putting your hello
world script in the original cgi-bin directory, and try again.
Oren
More information about the thelist
mailing list