I'm trying to setup Apache2.2 with mod_fcgid and libapache2-mod-perl2 with no luck.
I've created a
fcgi-bin directory in the root directory of my website and put there a
test.fcgi file with the following content:
#!/usr/bin/perl use CGI; print "This is test.fcgi!\n";
While trying to access it via
http://www.website.dom/fcgi-bin/test.fcgi I get error 500 (Internal Server Error).
Here is my vhost config:
<VirtualHost 126.96.36.199:8080> ServerName website.com DocumentRoot /var/www/data/website.com SuexecUserGroup user group ServerAlias www.website.com AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml <Directory "/var/www/data/website.com/fcgi-bin/"> Options +ExecCGI Allow from all Order allow,deny AddHandler fcgid-script .fcgi </Directory> </VirtualHost>
<IfModule mod_fcgid.c> AddHandler fcgid-script .fcgi SocketPath /var/lib/apache2/fcgid/sock IdleTimeout 3600 ProcessLifeTime 7200 MaxProcessCount 8 DefaultMaxClassProcessCount 2 IPCConnectTimeout 8 IPCCommTimeout 60 </IfModule>
[2010-04-06 03:02:47]: uid: (500/equ) gid: (502/equ) cmd: test.fcgi
Apache error log:
test! test! [Tue Apr 06 03:02:51 2010] [notice] mod_fcgid: process /var/www/data/website.com/fcgi-bin/test.fcgi(26267) exit(communication error), terminated by calling exit(), return code: 0 [Tue Apr 06 03:02:53 2010] [notice] mod_fcgid: process /var/www/data/website.com/fcgi-bin/test.fcgi(26261) exit(server exited), terminated by calling exit(), return code: 0
I've no clue why I'm getting error 500, but when I'm trying to access this file using console (
$ perl /var/www/data/website.com/fcgin-bin/test.fcgi) everthing works fine without any errors...
Any suggestions on how to solve this problem would be greatly appreciated.