# apache and fastcgi configuration problem.

## getfeus

I am trying to configure fastcgi on gentoo linux. But it doesn't work.

Problem : 

1. First, I emerge www-apache/mod_fcgid and I am trying to run code written in perl.

2. I modify apache configuration file.

/etc/conf.d/apache2

```
APACHE2_OPTS="[color=red]-D DEFAULT_VHOST[/color] -D INFO [color=red]-D CGI -D FCGID[/color] -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PERL"
```

/etc/apache2/modules.d/20_mod_fcgid.conf

```
<IfDefine FCGID>

LoadModule fcgid_module modules/mod_fcgid.so

SocketPath /var/run/fcgidsock

SharememPath /var/run/fcgid_shm

AddHandler fcgid-script .fcgi

</IfDefine>

```

3. Trying compile perl code before connect. perl -wl /var/www/cgi-bin/test.fcgi

```
#!/usr/local/bin/perl

use CGI::Fast

        socket_path  => '/tmp/9000',

        socket_perm  => 0777,

        listen_queue => 50;

use CGI qw/ :standard /;

use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;

my $cgi = CGI::Fast->new;

```

Failed to compile. perl is stopped and no error message generated.

```
#!/usr/local/bin/perl

use CGI::Fast;

use CGI qw/ :standard /;

use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;

my $cgi = CGI::Fast->new;

```

Working. 

Q1. I think it is not apache configuration problem. Because I don't write any code ilke print "Content-Type: text/html\n\n";

Q2. I have to check any other configuration?

Q3. Is this issue related to file permission of 9000? 

Q4. I heard manual page is http://fastcgi.coremail.cn/configuration.htm But I cannot access.

Thank you for reading my question. Best regards.

----------

