Getting MC CGI to work on OS X with "Web Sharing" turned on

Dave Cragg dcragg at lacscentre.co.uk
Sat Oct 18 09:38:04 EDT 2003


At 12:39 am -0500 18/10/03, Ken Ray wrote:
>>  > 3) I created a "cgi-bin" directory in the Sites folder to
>>  hold my CGI.
>>
>>  I think this is where you went off track. The Darwin "mc" app
>>  and your
>>  cgi "mt" files should be in
>>  "/Library/WebServer/CGI-Executables/" at the
>>  system level, not the user level.
>>
>
>>  Then in your user Sites folder, you can put html files that reference
>>  the cgi if you like. But the cgi itself has to be run by the system.
>>  (BTW, you can refer to the "CGI-Executables" folder as
>>  "cgi-bin" in your
>>  html files, and it still works. The OS treats the terms as
>>  interchangeable.)
>
>Ok, I put them there (both the "mc" app and my "simple.cgi" file (I'm
>using .cgi instead of .mt)), but when I attempt to call on the cgi
>directly from the address bar of safari by typing:
>
>http://192.168.1.100/~kenray/cgi-bin/simple.cgi
>
>I get a "Not Found" page saying that "the requested URL is not found on
>the server.
>
>What am I missing?

Try this:

http://192.168.1.100/cgi-bin/simple.cgi

The cgi-bin "alias" is for the whole domain. If you want separate 
cgi-bin folders for each user account, you'll need to edit the Apache 
config file (/etc/httpd/httpd.conf). Don't ask me how.

Cheers
Dave



More information about the metacard mailing list