LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Apache web site with perl scripts support (http://www.linuxquestions.org/questions/linux-networking-3/apache-web-site-with-perl-scripts-support-877587/)

aocferreira 04-28-2011 06:33 AM

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.

bathory 04-28-2011 06:59 AM

Hi,

Add
Code:

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

Regards

aocferreira 04-28-2011 06:59 AM

Everything was ok with the configuration! the problem was indeed the perl script who had errors :)


All times are GMT -5. The time now is 10:27 AM.