Apache2 + fcgid + Perl
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Hello, i hope anybody out there can help me with this problem, i tried
googlin it for 2 days and 10 hours per day, but no results.
First of all here's an excerpt of my configuration:
(PHP works just fine with this configuration and i thought Perl would
work similiar)
Vhost:
<VirtualHost *>
        ServerAdmin mrAdmin@localhost
        DocumentRoot /home/user2/htdocs
        ServerName www.server2.com
        SuexecUserGroup user2 user2
        AddHandler fcgid-script .php
        AddHandler fcgid-script .pl
        Alias /phpmyadmin /usr/share/phpmyadmin
        <Directory /usr/share/typo3/typo3_src-4.0>
    FCGIWrapper /var/www/server2TMP/php5-fcgid-htdocs .php
    Options +Indexes +FollowSymLinks +MultiViews +ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
	     </Directory>
        <Directory /usr/share/phpmyadmin>
        FCGIWrapper /var/www/server2TMP/phpmyadmin/php5-fcgid-htdocs .php
        Options Indexes FollowSymLinks MultiViews +ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
        </Directory>
        <Directory /home/user2/htdocs>
        FCGIWrapper /var/www/server2TMP/php5-fcgid-htdocs .php
        FCGIWrapper /var/www/server2TMP/perlwrap .pl
        Options FollowSymLinks MultiViews +ExecCGI
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
 		AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, 		
crit,
        # alert, emerg.
        LogLevel debug
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>
====
Perlwrapper:
#!/bin/sh
exec /usr/bin/perl -w
=====
Helloworld.pl in htdocs:
#!/usr/bin/perl -w
use strict;
use CGI::Carp qw(fatalsToBrowser);
my $headline = "Ein sauberes Script!";
print "Content-type: text/html\n\n";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
"\n";
print "<html><head><title>Test</title></head><body>\n";
print "<h1>$headline</h1>\n";
print "<p>nur auf das CGI-Modul wurde hier verzichtet ;-)</p>\n";
print "</body></html>\n";
===
I tried various helloworld.pl scripts , but no matter if i actualy use
the fast cgi extension from perl it's not working.
Here's the error log:
[Mon Apr 28 15:17:47 2008] [notice] mod_fcgid: process
/home/user2/htdocs/helloworld2.pl(4048) exit(server exited), terminated
by calling exit(), return code: 0
[Mon Apr 28 15:17:47 2008] [notice] mod_fcgid: process
/home/user2/htdocs/helloworld2.pl(4047) exit(server exited), terminated
by calling exit(), return code: 0
[Mon Apr 28 15:17:47 2008] [notice] mod_fcgid: process
/home/user2/htdocs/helloworld2.pl(4046) exit(server exited), terminated
by calling exit(), return code: 0
[Mon Apr 28 15:17:47 2008] [debug] arch/unix/fcgid_proc_unix.c(491):
(111)Connection refused: mod_fcgid: can't connect unix domain socket:
/var/lib/apache2/fcgid/sock/3916.30
[Mon Apr 28 15:17:51 2008] [notice] mod_fcgid: process
/home/user2/htdocs/helloworld2.pl(4050) exit(server exited), terminated
by calling exit(), return code: 0
[Mon Apr 28 15:17:56 2008] [notice] mod_fcgid: call
/home/user2/htdocs/helloworld2.pl with wrapper /var/www/server2TMP/perlwrap
[Mon Apr 28 15:17:56 2008] [notice] mod_fcgid: server
/home/user2/htdocs/helloworld2.pl(4052) started
[Mon Apr 28 15:17:56 2008] [debug] arch/unix/fcgid_proc_unix.c(491):
(111)Connection refused: mod_fcgid: can't connect unix domain socket:
/var/lib/apache2/fcgid/sock/3916.31
- --
Sometimes i get an
[Mon Apr 28 15:18:21 2008] [warn] mod_fcgid: can't apply process slot
for /home/user2/htdocs/helloworld2.pl
failure.
====
SuExec doesn't seem to be the problem :
 [2008-04-28 15:18:21]: uid: (1001/user2) gid: (1001/1001) cmd: perlwrap
Anybody ever had this problem?
In addition to the fast cgi problem normal cgi doesn't seem to work too.
Kind Regards
Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREDAAYFAkgVwV0ACgkQLMVLOR388SO9cACeOdhngdGqnowawpP/WfCFSfkg
5lMAmgP5makSJJWP+BNG10v5FWdHwzDE
=Hay2
-----END PGP SIGNATURE-----
Reply to: