LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-22-2004, 05:23 AM   #1
linux_child001
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Rep: Reputation: 0
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.
 
Old 06-22-2004, 06:10 AM   #2
Gnuru
Member
 
Registered: Jan 2004
Posts: 53

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing a script!! vishamr2000 Linux - Security 5 07-29-2005 03:34 AM
Executing install script for ... securehack Linux - Software 6 05-24-2005 12:02 PM
Apache executing Java Script linux_pioneer Solaris / OpenSolaris 2 08-26-2004 01:31 PM
executing shell script on apache nooodles Linux - General 1 06-29-2004 02:51 AM
executing script via webpage through apache server feetyouwell Linux - Software 7 02-08-2004 04:23 PM


All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration