• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

After adding cgi/perl handler scripts are forbidden

I have a perl script (test.pl) when I would access it it would display the source. now that I have added AddHandler cgi-script .cgi .pl to httpd.conf all scripts give me the error forbidden. even when I do a chmod 777 it still says forbidden how can I fix this??

Max
0
TheMaximumWeasel
Asked:
TheMaximumWeasel
  • 3
  • 2
  • 2
2 Solutions
 
ravenplCommented:
HAve Your perl script
#/usr/bin/perl
in the very first line?

Does it prints 'Content-Type: ...'
as it's very first line of output(followed by empty line)?
0
 
ravenplCommented:
Do You use suexec?
(and also, apache's errorlog will print what's wrong)
0
 
periwinkleCommented:
Assuming that your scripts are located in the cgi-bin directory, try also adding:

ScriptAlias /cgi-bin/ /full/path/to/cgi/scripts/

where /full/path/to/cgi/scripts/ is your full server path to the cgi directory.

I agree with ravenpl - the error_log is going to be your friend in this case.  It's probably located in one of the following:

/usr/local/apache/logs
/var/log/httpd

or the like.
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
TheMaximumWeaselAuthor Commented:
I fixed it I forgot the ExecCGI part in .htaccess

Max
0
 
TheMaximumWeaselAuthor Commented:
I split the points 50/50
0
 
periwinkleCommented:
That's very kind of you - thank you, and I'm glad you were able to solve your issue!
0
 
TheMaximumWeaselAuthor Commented:
no problem, I figure you should get something for trying to help me with this issue.

Max
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now