Hi, I have tried to setup apache with mod_actions so that when a page is requested e.g test.pl my cgi script is run and the results are returned to who ever requested the page. In my virtual host i have added the following settings: Code: Action perlfiles /home/admin/test.cgi AddHandler perlfiles .pl the cgi contains the following: Code: #!/bin/bash echo "HELLO THIS WORKS :)"; I then made a file test.pl and when i go to that file in my browser i get very weirdly a 404 error Code: Not Found The requested URL /home/admin/test.cgi /test.pl was not found on this server. If i remove this Action perlfiles /home/admin/test.cgi from the configuration then i do not get the 404 error, but my script does not run. Any ideas how i could fix this problem? I would really appreicate any help, Thanks, Alex
I don't know why the 404 but shouldn't the cgi script contain #!/bin/perl ? How about file permissions ?
The file is owned by the apache user and has execute permissions for all users Code: shouldn't the cgi script contain #!/bin/perl ? i dont actually want to run the perl script at the moment, i just want all perl scripts to output HELLO THIS WORKS for now
I just checked it, and when i request the page i get the following error: Code: [Mon Feb 18 15:49:27 2008] [error] [client 192.168.1.10] script '/home/admin/sharedip/home' not found or unable to stat the errors are very weird
Sure: Code: <VirtualHost *:80> ServerName localhost DocumentRoot /home/admin/sharedip Options -Indexes IncludesNoExec php_admin_value open_basedir /home/admin/sharedip <Directory /home/admin/sharedip> allow from all </Directory> # Perl Interpretter Settings Action perlfiles "/home/admin/test.cgi " AddHandler perlfiles .pl </VirtualHost>