So far it's still not working. I get a "file not found" error. Is
"www/cis/cgi-bin" relative to what I set as DocumentRoot? In otherwords, do
I need to include the full path to the cgi bin or just the part after
documentroot? Or does documentroot even have anything to with this? I set
documentroot to /home/mitch/www/htdocs. If the cgi bin is in
/home/mitch/www/cgi-bin, what do I do in <Directory>?

Because I have a directory structure like:

     /home/mitch/www/htdocs/myscript.html
     /home/mitch/www/cgi-bin/myscript.cgi

Here's what I have in my html file calling the cgi:

<form method="post" action="../cgi-bin/myscript.cgi">

I thought maybe trying to go up one directory ../ to get into the cgi-bin
might be causing a problem, because documentroot was
/home/mitch/www/htdocs. I don't know, but it just seemed to be making
things not-so simple and straightforward. So I changed it to:

     /home/mitch/www/htdocs/myscript.html
     /home/mitch/www/htdocs/cgi-bin/myscript.cgi

Then I redid the permissions and the html file to say action
="cgi-bin/myscript.cgi" and again as "/cgi-bin/myscript.cgi" but neither
worked. I still get the "file not found" error.

Would I get a "file not found" error because of an apache configuration
problem?

mitch



                                                                                       
                        
                    Keith Lynn                                                         
                        
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]                   
                        
                    uthal.edu>           cc:                                           
                        
                                         Subject:     Re: [newbie] Is CGI set up for 
user accounts from normal 
                    01/03/02             install?                                      
                        
                    03:49 PM                                                           
                        
                                                                                       
                        
                                                                                       
                        




Hi Mitch,
     In order to allow cgi scripts to run, you need to give them
permission in your httpd.conf file. Suppose you want to have scripts
ending in .cgi in the directory /www/cis/cgi-bin to be interpreted as
scripts. Then you would include the following in your httpd.conf file.

<Directory /www/cis/cgi-bin>
   AddHandler cgi-script cgi
   Options +ExecCGI
</Directory>

     Then make sure that permissions are set (at least world execute on
directories and scripts), and you should be able to run scripts. If you
need any other help, let me know.

Keith Lynn
Systems Administrator
School of Computer and Information Sciences
University of South Alabama
Mobile, AL 36608
Phone: (334) 460-6390
Fax: (334) 460-7274
Alternate E-mail: [EMAIL PROTECTED]
URL: http://www.cis.usouthal.edu/~lynn/

On Thu, 3 Jan 2002 [EMAIL PROTECTED] wrote:

> I have a server on an intranet. Is CGI already set up? If so, where do I
> put my CGIs for new users? I tried to add a cgi-bin to a user's home
> directory, for myself, because I was worried about running CGIs as root,
if
> that would even happen. So, I made a cgi-bin and set the permissions, but
I
> get a "You don't have permission" error message. The permissions were set
> to 755, so everyone could read and execute but only I could write. I
> checked this over and over. Is there some reason that I can't *yet* run
> CGIs other than file permissions? I tried FTPing the files as ascii and I
> tried just writing them on the linux machine. I've also used stock, very
> easy intro scripts that just return "Hello world" to the browser. And
I've
> successfully used CGI on my personal machine hosted by professionals. It
> appears to me -- I installed Mandrake myself -- that CGI isn't set up
> correctly for a user account. How do I do that?
>
> Could someone either explain or point me to some place where I can read
how
> to set up CGI for users on Mandrake Linux running Apache? Everthing I
find
> is either just reference material -- which doesn't help if you're a
newbie
> -- or how to write CGIs.
>
> mitch
>
>
>






Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to