Running CGI Scripts on Apache Server

Running CGI Scripts on Apache Server

Post by Bill Johnso » Sun, 11 Nov 2001 13:24:17



I'm having trouble running CGI scripts on my Apache server.  I want to
install and run a cgi counter, but I couldn't get it to work.  So, in order
to do some testing, I'm loading a guestbook.html file that just allows you
to enter your name, email address and a message.  The file then calls a
guestbook.cgi file which parses the data entered into the form and sends it
to me in an e-mail.

Whenever the cgi script is called, I get the following error:

    Forbidden:

        You don't have permission to access /var/www/cgi-bin/guestbook.cgi
on this server.

In my browser's URL window I have:
http://www.myservername.com/var/www/cgi-bin/guestbook.cgi so it's looking
for the script in the directory in which it is located.

I've used chmod to set the permissions to 755 on the cgi-bin directory.

What am I missing?

I'm an Apache newbie, so please consider that when you respond.

Thanks in advance for any help that you provide.

Best regards,

Bill

 
 
 

Running CGI Scripts on Apache Server

Post by Johan Mulde » Sun, 11 Nov 2001 23:45:58


*snip*

Quote:> I've used chmod to set the permissions to 755 on the cgi-bin directory.
> What am I missing?

Did you set that same mode for the cgi script itsself?
Check the error log if you did..

 
 
 

1. apache: give /home/mailman/cgi-bin permissions to run cgi-scripts.

Hey ho,
I try to install mailman on my server.
Now I have to give /home/mailman/cgi-bin permissions to run cgi-scripts.
How can I do this?
In the documentation of mailman s.th. like
Exec          /mailman/*      $prefix/cgi-bin/*
or
ScriptAlias   /mailman/       $prefix/cgi-bin/

is shown. Which one is right, or none?

Bye
 Jonas

--
Some people have told me they don't think a fat penguin really embodies the
grace of Linux, which just tells me they have never seen a angry penguin
charging at them in excess of 100mph.  They'd be a lot more careful about
what they say if they had.  -- Linus Torvalds, announcing Linux v2.0

2. Anti-virus and Update management tools

3. Apache gets SIGSEGV while running CGI script, why?

4. Depth - default to 16 instead of 8

5. Apache doesn't seem to run my cgi scripts

6. How to print DVI files?

7. Running ssh in an cgi script via apache

8. PortServer/16 Realtty login LF problem

9. Apache 1.3.9 How to run a shell script in a CGI?

10. Running CGI scripts with user permissions in Apache?

11. Getting CGI Script to Run in Apache 1.2.4

12. Apache: "Couldn't spawn child process" running CGI script

13. Apache does not run cgi scripts