Subject: Re: Apache and CGI Problems (probably off-topic)
To: Joshua E Hope <otaku@unixgeek.ml.org>
From: Joe Laffey <joe@laffeycomputer.com>
List: port-mac68k
Date: 12/06/1998 10:25:39
On Sun, 6 Dec 1998, Joshua E Hope wrote:

> I'm at wits end, and am close to going insane!
> 
> Whenever I try executing a certain CGI, I get the error message: "405
> Method not allowed...not allowed to use method POST on /cgi-bin/cgi"
> 
> I checked my access.conf file, and even enabled ExecCGI access BY DEFAULT
> to ANY directory...yet still it won't execute. I also tried accessing the
> two CGIs that come pre-packaged with apache, but instead of executing lynx
> just displays their text (yes, they are +x).
> 
> I'm using a fairly new version of Apache. The CGI that gives the error was
> written in C with cgic. 


Be sure you have the following line in your srm.conf
AddHandler cgi-script .cgi

Also be sure you have something like this in your access.conf
<Directory /usr/pkg/http/*/cgi-bin> #or whatever directories you want it
AllowOverride None
Options ExecCGI

</Directory>


Then name your scipts with a .cgi
Apache does all kinds of security checks for cgis. I think that the cgi
itself must not be writeable by anyone but the owner (definitely not
world). Also, I think that no directories in the directory tree down to
the script may be writeable by anyone but the owner.

Check out www.apache.org in the server docs section for more info. Check
your error log for clues as to why the script did not run. The Method Not
supported would indicate to me that the config files need tweeking because
you are trying to post to a file or directory that Apache will only do a
GET from.

Good luck,

Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
http://www.laffeycomputer.com
-----------------------------