:> Another annoying beginner. I am trying to teach myself more about CGI
:> scripting for server side forms. Since my commercial ISP doesn't allow
:> access to a cgi-bin dir, I am trying to use the Apache server that came
:> with my RH LINUX. So far all I get back are the unprocessed source
:> documents. Anybody out there have the magical KNOW that will allow me to
:> process server side forms in/on the privacy of my own box?
: You need to check at least three things:
: 1) The scripts you're trying to run have execute permission for the
: appropriate user (whichever user apache is running as)
Usually this is done by 'chmod a+x scriptname' which gives everyone
execute permissions.
: 2) They scripts have appropriate extensions, such as .cgi or .pl
I've never found this to be necessary, myself. None of my scripts (that
all work fine) have extensions...I just call them 'getCount' or something
like that...but extensions do make directory listings easier to read.
This works fine in the latest apache and the web server that comes with
Digital UNIX.
: 3) The Apache config scripts (access.conf and srm.conf are the
: appropriate ones, I think) are set up to allow cgi access from the
: appropriate directory and the handlers are present (eg the line
: AddHandler cgi-script .cgi is present and uncommented in srm.conf)
: The .conf files are fairly readable - have a play around with them,
: restarting the server each time you change them, and best of luck!
I don't know what version came with RH, but the newest version I grabbed
off the net had all of it's config stuff in httpd.conf...kinda nice since
messing with three config files (the old way) really sucked. Anyway, what
you're looking for is something like this:
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes FollowSymLinks ExecCGI
^^^^^^^
That's the keyword. There's also plenty more config stuff in there you
need to read/change, but like the previous poster said, it's fairly easy
to follow.
One last note: CGI itself is pretty easy...it's the scripting languages
that'll throw you. Most of the info on the web makes it sounds really
hard.
-------------------------------------------------------------------
Jeremy Buchmann "Those who trade freedom for safety deserve
-------------------------------------------------------------------