Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no permission to access /cgi-bin/test.cgi

Status
Not open for further replies.

hisham

IS-IT--Management
Nov 6, 2000
194
Hello every one
I installed Apache and php in Linux box, every thing goes very well, I create a test cgi file and I put it in the cgi-bin directory, but always I get: Forbidden, you don’t have permission to access /cgi-bin/test.cgi in this server, in my httpd.conf I configured:
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/

<Directory “/usr/local/apache/cgi-bin/”>
AllowOverride None
Options +ExecCGI
</Directory>

AddHandler cgi-script .cgi .pl

PLS. Any body can tell me why I could not run the script.
Thanks in advance.
 
I have to agree with wullie on this one. Most permission errors are caused by incorrect permissions on your directories and/or files. From the looks of things, you have httpd.conf configured correctly.
 
Thank you for your answers

I rechecked all the permission, but now I get: Internal server error, I checked the error_logs file and I found the following error: premature script header error then I decided to put all scripts that should be executed by the mod_perl enabled server in the /home/httpd/perl/ directory by adding add the following configuration to httpd.conf :

Alias /perl/ /home/httpd/perl/

PerlModule Apache::Registry
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
allow from all
</Location>

Now all my scripts in /home/httpd/perl/ are running very well, while in the cgi-bin still give me the Internal server error. How can I fix that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top