LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 12-20-2002, 11:57 AM   #1
cannus
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Rep: Reputation: 0
Disallowing apache to use cgi and perl


I'm having a hard time with my apache serve and formmail scripts being abused by spammers, so I would like to disable cgi and perl for use by apache...
can anyone give me a hand?
 
Old 12-20-2002, 12:10 PM   #2
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You could always remove or fix the scripts that are being abused.
 
Old 12-20-2002, 12:16 PM   #3
cannus
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
i thought about that, but then my users could simply just replace them. There's way too many scripts to patch also.. this is why I'm looking for a blanket fix
 
Old 12-20-2002, 12:33 PM   #4
shaggz
Member
 
Registered: Dec 2002
Location: FuNkYToWN
Distribution: SuSe, Gentoo, Fedora
Posts: 64

Rep: Reputation: 15
hehehe I replied to this on another post.

Simply chmod 000 /usr/bin/perl


This will disable perl and also make it very easy to reenable it once you inform them of the patches.
 
Old 12-20-2002, 12:43 PM   #5
cannus
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
that would work, but we need other users aside from apache to be able to use perl.
 
Old 12-20-2002, 12:59 PM   #6
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Find the following line in your httpd.conf and comment it out :

AddHandler cgi-script .cgi .pl
 
Old 12-20-2002, 01:05 PM   #7
cannus
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
unfortunately, I've already done that also...
 
Old 12-20-2002, 01:36 PM   #8
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Okay...

Look in your <virtual host> and or <directory> options and make sure there are no ExecCGI directives in there..

Failing that, simply move the cgi's, pl's and whatever else is executing to a new directory, look at the error log, and figure out where it's being called from.

Slick.
 
Old 12-21-2002, 05:51 PM   #9
robgo777
Member
 
Registered: Nov 2002
Posts: 35

Rep: Reputation: 15
All you have to do is open your httpd.conf file and comment out the following:

ScriptAlias /cgi-bin/ "/path/to/your/cgi-bin/"

In case you don't know, your httpd.conf file is probably located in:
/etc/httpd/conf/

Have fun
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
have apache deliver the output of perl cgi scripts immidiately fibbi Linux - Software 2 07-13-2004 12:17 PM
cgi perl : I cant get perl to append my html file... the_y_man Programming 3 03-22-2004 05:07 AM
I think I need a perl, apache, cgi GOD WorldBuilder Linux - Software 1 09-21-2003 09:49 AM
Enabling CGI and Perl on Apache 2.0.47 666Snake666 Linux - Newbie 1 09-17-2003 01:20 PM
apache v2.0.44 + cgi ; securing cgi-support in apache markus1982 Linux - General 0 01-20-2003 01:03 PM


All times are GMT -5. The time now is 07:11 PM.

Main Menu
 
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
Open Source Consulting | Domain Registration