LinuxQuestions.org
Review your favorite Linux distribution.
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 04-28-2011, 06:33 AM   #1
aocferreira
Member
 
Registered: Feb 2011
Posts: 110

Rep: Reputation: 0
Apache web site with perl scripts support


Hello,

teste.domain.com:

Code:
<VirtualHost *:80>

   ScriptAlias /cgi-bin/ /home1/_sites/teste/site/cgi-bin/
   <Directory /home1/_sites/teste/site/cgi-bin/>
   Options FollowSymLinks +ExecCGI
   AllowOverride None
   </Directory>

  ServerAdmin administrator
  DocumentRoot /home1/_sites/teste/site/
  ServerName teste.domain.com
  ErrorLog /home1/_sites/teste/log/apache/error.log
  CustomLog /home1/_sites/teste/log/apache/access.log combined
  php_admin_value safe_mode 0
  php_admin_value open_basedir /home1/_sites/teste:/tmp
  AddDefaultCharset UTF-8
  UseCanonicalName Off
</VirtualHost>
In folder /home1/_sites/teste/site I have the index.html file and a cgi-bin folder, both of them with www-data owner and group. In cgi-bin folder I have a perl script which I want to test (also with the respective owner and right permissions).

When I access http://teste.domain.com I can see the content of the index.html file.. but if I try to access http://teste.domain.com/cgi-bin/perltest.pl I get an error:

File not found

Firefox can't find the file at http://teste.domain.com/cgi-bin/perltest.pl.

* Check the file name for capitalization or other typing errors.

* Check to see if the file was moved, renamed or deleted.

Am I making something wrong? Thanks.
 
Old 04-28-2011, 06:59 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,885

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Hi,

Add
Code:
SetHandler cgi-script
inside the <Directory /home1/_sites/teste/site/cgi-bin/>...</Directory>

Regards
 
Old 04-28-2011, 06:59 AM   #3
aocferreira
Member
 
Registered: Feb 2011
Posts: 110

Original Poster
Rep: Reputation: 0
Everything was ok with the configuration! the problem was indeed the perl script who had errors
 
  


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 scripts won't run on Apache -- they did before Tom Douglas Linux - Server 1 02-17-2008 06:26 AM
Executing perl scripts in apache kladizkov Linux - Server 2 10-04-2006 07:35 AM
How can I run a perl and cgi scripts in my apache.?. ethnicme Programming 6 07-21-2006 04:02 AM
Running web based perl scripts in userdirs markham82 Linux - Networking 1 12-15-2004 06:51 AM
chrooting apache v2 (php, ssl, perl support) ; perl configuration markus1982 Linux - Security 3 01-26-2003 06:15 PM


All times are GMT -5. The time now is 08:16 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration