-   Linux - Networking (
-   -   Apache web site with perl scripts support (

aocferreira 04-28-2011 06:33 AM

Apache web site with perl scripts support


<VirtualHost *:80>

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

  ServerAdmin administrator
  DocumentRoot /home1/_sites/teste/site/
  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

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 I can see the content of the index.html file.. but if I try to access I get an error:

File not found

Firefox can't find the file at

* 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



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


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 04:19 AM.