LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 08-30-2004, 09:01 AM   #1
tethysgods
Member
 
Registered: May 2004
Posts: 166

Rep: Reputation: 17
Apache and cgi 403 Error.


It should have been easy enough, but here I am.

I have perl and Apache installed, and my cgi-bin is in /srv/www/cgi-bin.
Here I have put the usual Hello World type first ever cgi file Hello.cgi.
Here, as root I did chmod ugo+rx Hello.cgi, so there shouldn't be any
permissions problem. So far so good.

In my httpd.conf I have put

ScriptAlias /cgi-bin/ /srv/www/cgi-bin

<Directory /srv/www/cgi-bin/>
Options +ExecCGI
</Directory>

AddHandler cgi-script cgi
AddHandler cgi-script pl

And my html file contains a link

<a href="http://localhost/Hello.cgi"> This is a CGI script </a>

What I get is an Error 403, Access forbidden, You don't have permission
to access this object etc.


I guess that since the cgi script has the permissions that somethings
wrong with the httpd.conf file, but I have been searching the web for the last four hours, and now I'm here.
 
Old 08-30-2004, 09:51 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Try: <a href="http://localhost/cgi-bin/Hello.cgi"> This is a CGI script </a>
Also remove the "+" in front of ExecCGI
 
Old 08-30-2004, 10:06 AM   #3
tethysgods
Member
 
Registered: May 2004
Posts: 166

Original Poster
Rep: Reputation: 17
Thanks

I had tried various things here, and I thought I had tried
the /localhost/cgi-bin, but obviously I hadn't.

Thanks again, now its time to start debuggibg my perl script!
 
  


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
Apache 403 error with Mandrake 10.1 MooCows Linux - Networking 15 03-19-2005 05:50 PM
Apache 403 Error?? jlsain Linux - Software 4 05-08-2004 04:45 PM
Apache 403 error with Mandrake 9.0 Skywolf Linux - Newbie 11 07-15-2003 08:46 AM
apache 403 error fix cortj Linux - Software 0 02-25-2003 04:27 PM
apache 403 error forbidden? bulliver Linux - General 4 01-31-2003 08:47 AM


All times are GMT -5. The time now is 04:28 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration