LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-08-2005, 11:02 PM   #1
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
Apache and CGI is giving me headaches


Every time I try to run a .cgi script with apache I get "403 Forbidden". I know ther permissions are right.

I checked apache's error log and I found:

Code:
[Wed Jun  8 23:52:54 2005] [error] [client 127.0.0.1] Options ExecCGI is off in this directory: /home/joe/public_html/cb.cgi
I've tried setting it up so that apache executes *.cgi files anywhere and everywhere, but I might be missing something.

Can anyone help? Thanks.
 
Old 06-09-2005, 12:39 AM   #2
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
Look for the lines in your httpd.conf that read (default):
Code:
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
And change them to
Code:
<Directory />
    Options FollowSymLinks ExecCGI
    AllowOverride All
</Directory>
It should be noted that having ExecCGI on for all directories is a security risk

AllowOverride = All will allow you to use .htaccess files in your web directories as well
 
Old 06-09-2005, 09:30 AM   #3
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
I've tired doing this. (I did restart the server.)

But, I'm still getting the same error; all the permissions and directories are set to ugo+r. Is there something I'm missing? I've looked through the "httpd.conf" file and I found the scripting DIR. Its set to /var/www/cgi-bin. I commented out this and put it to my own public_html/cgi-bin directory.

Now here is something strange..
Even after I commented out the scripting dir and restarting the server, the *.cgi script works if I put it in /var/www/cgi-bin. Is it possible that I am not restarting it right?
here is what I use to restart:
Code:
killall -HUP httpd
 
Old 06-10-2005, 11:24 AM   #4
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
Do you have

AddHandler cgi-script .cgi

in your httpd.conf?
 
  


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
Chrooting Apache, JAIL is giving me problems xbaez Linux - Software 1 08-08-2005 10:14 AM
why is apache giving me a 404 error linuxmandrake Linux - Software 4 06-17-2005 09:16 AM
Apache and Flash Headaches Kong Linux - Software 2 01-02-2004 01:54 AM
giving apache the correct permissions dflorence Linux - Newbie 3 11-06-2003 08:27 AM
apache v2.0.44 + cgi ; securing cgi-support in apache markus1982 Linux - General 0 01-20-2003 01:03 PM

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

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