Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 08-30-2004, 08:01 AM   #1
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

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, 08:51 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,166

Rep: Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391Reputation: 1391
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, 09:06 AM   #3
Registered: May 2004
Posts: 166

Original Poster
Rep: Reputation: 17

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!


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

All times are GMT -5. The time now is 07:47 AM.

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