LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-28-2005, 09:31 PM   #1
Garda
Member
 
Registered: May 2005
Distribution: Debian
Posts: 83
Blog Entries: 2

Rep: Reputation: 15
cant get perl working with apache2


am using apache2 on debian.

i added these two lines into my apache2.conf
Code:
AddHandler cgi-script .pl
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
and in /var/www/cgi-bin/ i put the following little hello world file

Code:
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<html><h1>Hello World</h1></html>\n";
but when i try localhost/cgi-bin/hello.pl in my browser it says it cant find
anything. i have also tried

chmod -R 755 cgi-bin

but still doesn't work
 
Old 09-28-2005, 10:27 PM   #2
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
Double check that hello.pl actually has the execute permission. Also, tail the error_log for what the error message is according to Apache. Personally, I think the AddHandler directive must be placed within a container directive such as <Directory>. I'm not sure where you placed yours. You may actually need to get rid of the <ScriptAlias> directive and use

Code:
Alias /cgi-bin/ /var/www/cgi-bin/

<Directory "/var/www/cgi-bin/">
  Options +ExecCGI
  AddHandler cgi-script .pl
</Directory>

Last edited by aznluvsmc; 09-28-2005 at 10:31 PM.
 
  


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 (WebFTP) and Apache2... darkarcon2015 Slackware 15 01-27-2005 02:56 PM
Need help compiling mod perl with apache2 unixmad Linux - Software 0 08-25-2004 06:34 AM
how do i install mod perl with apache2 unixmad Linux - Newbie 2 08-22-2004 12:00 PM
Perl error after upgrade apache -> apache2 FloFri Debian 6 05-25-2004 04:36 AM
Perl error after upgrade apache -> apache2 FloFri Debian 0 05-25-2004 01:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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