LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script is not executing in Apache!!! (https://www.linuxquestions.org/questions/linux-newbie-8/script-is-not-executing-in-apache-196298/)

linux_child001 06-22-2004 04:23 AM

Script is not executing in Apache!!!
 
I am a beginner to Apache and i wrote a small perl script and moved it to cgi-bin directory and
set the access permission to 755(both the directory cg-bin and script) and tried to execute via brower .But it is displaying an error ,the error is...

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster
Error 403

sr2
Tue 22 Jun 2004 02:18:04 PM IST
Apache/2.0.40 (Red Hat Linux

Help Me I Am Just A Beginner.

Gnuru 06-22-2004 05:10 AM

httpd.apache.org has all the answers.

To run a cgi-script in the directory,you need to have access to the directory:

This means that in the apache config file, usually /etc/apache/httpd.conf, you need to allow access in the relevant Directory, Virtual Host or Location block by adding something like:

Order deny,allow
Allow from all

Note that the above opens that particular thing to everyone.

You also need to allow cgi scripts to be executed, so you have to add:

Options +ExecCGI

You'll beed to set a handler for it, by adding something like:

AddHandler cgi-script pl

assuming your perl script ends in pl.

Alternatively, you could set up a ScriptAlias directory.


All times are GMT -5. The time now is 08:26 PM.