LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-21-2003, 09:58 PM   #1
Joshsawyer77
LQ Newbie
 
Registered: Dec 2002
Location: Milwaukee
Distribution: Mandrake
Posts: 22

Rep: Reputation: 15
Problems CGI apache


I have set up my web server to use the Cgi-bin. I edited the httpd.conf file and added:

"ScriptAlias /cgi-bin/ /var/www/cgi-bin/"

I then restarted my web server. From my web browser I try to open "http://mydomain.com/hello.pl"
Then I get "error 403 forbidden You don't have permission to access /cgi-bin/hello.pl on this server."
I have given read, write, and execute permissions on all the directories/files I can think of that would deal with this. When I telnet into my box I can run "perl hello.pl and it works. any one know what I am doing wrong?
 
Old 01-22-2003, 06:47 PM   #2
jkrohn
Member
 
Registered: Jan 2003
Location: Urbana, IL
Distribution: Slackware, Mandrake
Posts: 62

Rep: Reputation: 15
1) Have you tried ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

2) Also how are the <directory> tags setup for /var/www/cgi-bin?
 
Old 01-22-2003, 08:45 PM   #3
Joshsawyer77
LQ Newbie
 
Registered: Dec 2002
Location: Milwaukee
Distribution: Mandrake
Posts: 22

Original Poster
Rep: Reputation: 15
I did not use quotes around the path in ScriptAlias /cgi-bin/ "/var/www/cgi-bin/". Should I ? I have included the directory tags that were located in the commonhttpd.conf file.

<Directory /var/www/cgi-bin>
AllowOverride All
Options ExecCGI
</Directory>

This is the one that I think may be causing me problems but I dont know.

<Directory />
Options -All -Multiviews
AllowOverride None
Order deny,allow
</Directory>
 
Old 01-22-2003, 10:03 PM   #4
jkrohn
Member
 
Registered: Jan 2003
Location: Urbana, IL
Distribution: Slackware, Mandrake
Posts: 62

Rep: Reputation: 15
Try changing order to allow, deny instead of deny, allow
 
Old 01-23-2003, 05:42 PM   #5
Joshsawyer77
LQ Newbie
 
Registered: Dec 2002
Location: Milwaukee
Distribution: Mandrake
Posts: 22

Original Poster
Rep: Reputation: 15
Tried it and still no luck. I get this error in my error log

[Thu Jan 23 17:41:42 2003] [error] [client 10.10.1.10] client denied by server configuration: /var/www/cgi-bin/hello.pl
 
Old 01-23-2003, 08:56 PM   #6
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
Two things I can think of,

Add the AddHandler for .pl

<Directory /var/www/cgi-bin>
AllowOverride All
Options ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>

Obvious but sometimes overlooked, the cgi-bin directory and all cgi scripts must have execute privileges. Do a chmod -R 755 on the directory if they don't
 
  


Reply



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 .cgi execution problems KeithKessler Linux - Software 7 12-01-2004 11:19 AM
Apache CGI problems clb Linux - Networking 2 11-24-2004 10:03 AM
Apache 1.4.7 cgi problems Sm0k3 Programming 1 10-19-2003 02:12 PM
Problems with apache and cgi Joshsawyer77 Linux - General 3 01-25-2003 01:39 PM
Apache and SSI/CGI PROBLEMS morbo Linux - Networking 2 01-18-2003 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:18 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
Open Source Consulting | Domain Registration