LinuxQuestions.org
Visit Jeremy's Blog.
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 11-30-2004, 09:35 PM   #1
KeithKessler
Member
 
Registered: Dec 2001
Location: Stow, OH
Distribution: Slackware 10
Posts: 73

Rep: Reputation: 15
Apache .cgi execution problems


Hello all,

I wanted to execute .cgi programs outside the normal cgi-bin directory so i added

AddHandler cgi-script .cgi

to my httpd.conf & modified the <Directory> tag as follows:

<Directory "/usr/local/apache2/htodcs/keithkessler">
DirectoryIndex index.htm index.html index.php
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride Options FileInfo
order allow,deny
allow from all
</Directory>

I even added Options +ExecCGI to the .htaccess file

but my error_log looks like this

ExecCGI is off in this directory: /usr/local/apache2/htdocs/keithkessler/mt-check.cg

I've been playing with this for hours and can't figure it out.

Thanks so much!
 
Old 11-30-2004, 09:58 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
why do you allow options to be overridden?

AllowOverride None
 
Old 12-01-2004, 09:23 AM   #3
KeithKessler
Member
 
Registered: Dec 2001
Location: Stow, OH
Distribution: Slackware 10
Posts: 73

Original Poster
Rep: Reputation: 15
I allow override of FileInfo for the Gallery software package - options really don't need be overriden and I have removed that but still the same result.

I've also tried with AllowOverride None and still the same result.

Thanks,

--KK
 
Old 12-01-2004, 09:39 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Try
Code:
ScriptAlias /cgi/ "/usr/local/apache2/htodcs/keithkessler
So when you go to http://your.server.com/cgii/test.cgi it will run the script from your directory
 
Old 12-01-2004, 09:51 AM   #5
KeithKessler
Member
 
Registered: Dec 2001
Location: Stow, OH
Distribution: Slackware 10
Posts: 73

Original Poster
Rep: Reputation: 15
Okay, now this makes no sense!

I assed:

ScriptAlias /cgi/ "/usr/local/apache2/htodcs/keithkessler/"

and when I try to access

http://www.keithkessler.com/cgi/mt-check.cgi I get a 404 - the file is there

The error_log reads:

script not found or unable to stat: /usr/local/apache2/htodcs

Why doens't it continute out to the full path?

The scripts to execute if I place them in the cgi-bin directory but I need to be able to execute the scripts in the site root.

--KK

Last edited by KeithKessler; 12-01-2004 at 10:02 AM.
 
Old 12-01-2004, 10:38 AM   #6
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
Quote:
htodcs
...look a little harder...
 
Old 12-01-2004, 10:44 AM   #7
KeithKessler
Member
 
Registered: Dec 2001
Location: Stow, OH
Distribution: Slackware 10
Posts: 73

Original Poster
Rep: Reputation: 15
THANKS!

Of am I embarrassed!!

That works just fine now but is there any way to get them to execute in the site root without using an alias?

Thanks,

--KK
 
Old 12-01-2004, 11:19 AM   #8
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
eh.. .typos are my number 1 problem -- first thing i look for when troubleshooing...

yeah... all i use is the
AddHandler cgi-script .cgi .pl
and options ExecCGI (on the base directory)

--don't know why it's getting overwritten for you... when you get some free time, you might want to comb your httpd conf file...
 
  


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
#! does not seem to work in cgi-bin?? (script execution) servnov Linux - General 6 12-06-2004 07:23 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
Problems CGI apache Joshsawyer77 Linux - Software 5 01-23-2003 08:56 PM

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

All times are GMT -5. The time now is 05:40 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