LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2007, 02:54 AM   #1
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Rep: Reputation: 32
how to configuer perl with apache2 ? ...


hello all .....,
this is my second post with this issue i posted before in the programming forum and i didnot get the answers so i hope to find it here

i want to configure perl with apache 2 to make me able to write cgi programs and simply i have apche2 installed and also i have perl installed and i was writing perl programs and i got the output by the shell and i want to get it by browser so i but this lines on the httpd.conf file

PHP Code:
   ScriptAlias /cgi-bin"/usr/local/apache/cgi-bin/" 

PHP Code:
 <Directory "/usr/local/apache2/cgi-bin">
    
AllowOverride None
    Options None
    Order allow
,deny
    Allow from all
</Directory
and when i want to run the program from abrowser like that

http://localhost/cgi-bin/hello.cgi
igot this error

Forbidden

You don't have permission to access /cgi-bin/hello.cgi on this server

and iam sure i have changed the ownership of the file to a normal user on the system what i can Do ? >......

thanx for all
 
Old 03-05-2007, 03:12 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
You must make that your cgi-bin script is executable:
Code:
chmod +x /usr/local/apache2/cgi-bin/hello.cgi
 
Old 03-05-2007, 03:26 AM   #3
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
still having the same error :S

Forbidden

You don't have permission to access /cgi-bin/test.cgi on this server.

i want to know what about adding mod_perl to apache how can it be done ? .... and itis an important to make perl working with apache ?
 
Old 03-05-2007, 04:15 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Now that I looked better your config you have an error in the path of your cgi directory:
Quote:
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
vs
Quote:
<Directory "/usr/local/apache2/cgi-bin">
Note the 2 after apache.
 
Old 03-05-2007, 06:57 AM   #5
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanx for your support i make it as apache2 and when i run the localhost/cgi-bin/hello.cgi igot this

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
you@example.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
 
Old 03-05-2007, 07:24 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
So you made:
Code:
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
and still not working?
If you want to debug the "Internal Server Error", use the documentation provided by apache.
 
Old 03-05-2007, 11:21 AM   #7
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanx mr bathory i search in the apache pages and the problem solved thanx
 
  


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
perl files download instead of parsed on apache2 mod-perl2 not parsing perl files zeigerpuppy Debian 1 02-16-2006 06:31 AM
Perl not working on my Apache2 SuseLinux Notaguru Linux - General 2 01-21-2006 05:27 PM
cant get perl working with apache2 Garda Linux - Networking 1 09-28-2005 11:27 PM
Perl (WebFTP) and Apache2... darkarcon2015 Slackware 15 01-27-2005 03:56 PM
Need help compiling mod perl with apache2 unixmad Linux - Software 0 08-25-2004 07:34 AM


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