Good Instruction for RT3 + Apache2 + FastCGI + MYSQL

Ohh…again…what is this?

My web browser produced an Internal Server Error then I checked the error
log and I found it consistently/repeatedly producing this error.

[Fri Sep 26 17:39:03 2003] [crit] (13)Permission denied: FastCGI: can’t
create server “/usr/local/rt/bin/mason_handler.fcgi”: bind() failed
[/etc/httpd/logs/fastcgi/f0fbdc528b6cf761a517e935bb97072f]
[Fri Sep 26 17:39:04 2003] [crit] (13)Permission denied: FastCGI: can’t
create server “/usr/local/rt/bin/mason_handler.fcgi”: bind() failed
[/etc/httpd/logs/fastcgi/f0fbdc528b6cf761a517e935bb97072f]

I checked again the mailinglist and I found this unanswered thread

Hi,

i just installed rt3.01 with fastcgi under apache 1.3.27. Dependencies are
all ok. But now i always get this error log:

[Mon Apr 28 13:26:28 2003] [error] [client 217.226.24.115] (13)Permission
denied: FastCGI: failed to connect to server
“/opt/rt3/bin/mason_handler.fcgi”: connect() failed
[Mon Apr 28 13:26:29 2003] [crit] (13)Permission denied: FastCGI: can’t
create server “/opt/rt3/bin/mason_handler.fcgi”: bind
() failed [/usr/local/apache/logs/fastcgi/362fab4db3d651b6d082c0358ebb4d83]

I tried to change group and user of different directories but nothing
helped. Please help!!!

Thank you very much!

Manuel Bernardy

I re-checked my httpd.conf with this entry for any incorrect syntax

NameVirtualHost 10.0.0.10

<VirtualHost 10.0.0.10>
ServerAdmin request_tracker@acerhomes.com
ServerName file.acerhomes.com
DocumentRoot “/usr/local/rt/share/html”
AddDefaultCharset UTF-8

    <IfModule mod_fastcgi.c>
            AddHandler fastcgi-script fcgi
            FastCgiServer /usr/local/rt/bin/mason_handler.fcgi

-idle-timeout 3600
Alias /NoAuth/images /usr/local/rt/share/html/NoAuth/images/
ScriptAlias / /usr/local/rt/bin/mason_handler.fcgi/

But it seems it started without an error.
My current setup is httpd-2.0.40-21.5 (RPM) and mod_fastcgi-2.4.0

Needed your help again!

—rommie

I solved this already. You need to put this on httpd.conf

AddHandler fastcgi-script fcgi
FastCgiIpcDir /var/log/httpd/fastcgi
FastCgiServer /usr/local/rt/bin/mason_handler.fcgi -idle-timeout 3600
Alias /NoAuth/images /usr/local/rt/share/html/NoAuth/images/
ScriptAlias / /usr/local/rt/bin/mason_handler.fcgi/

FastCgiIpcDir directs mod_fastcgi where it will put sockets and lock files.
Then you need to chown to apache or www all httpd
log directories including parents and chmod to 777.

Then you always need to check httpd error log for other permission error.

If you got this error ‘Can’t do setuid’, just install perl-suidperl RPM
which available from your RH9 CD or website.

That’s it. Then you should be able to see your first login screen.

I am about to configure my email and users list.

—rommie

Rommie a écrit :

I solved this already. You need to put this on httpd.conf

AddHandler fastcgi-script fcgi
FastCgiIpcDir /var/log/httpd/fastcgi
FastCgiServer /usr/local/rt/bin/mason_handler.fcgi -idle-timeout 3600
Alias /NoAuth/images /usr/local/rt/share/html/NoAuth/images/
ScriptAlias / /usr/local/rt/bin/mason_handler.fcgi/

FastCgiIpcDir directs mod_fastcgi where it will put sockets and lock files.
Then you need to chown to apache or www all httpd
log directories including parents and chmod to 777.

That might be ok for testing but I woudln’t recommend these settings for
a production server as chmod’ing log directory to 777 might be a big
security (and confidentiality) hole.

Another way is to put fastcgi sockets and files in another directory.
For example :

In httpd.conf:

FastCgiIpcDir /var/run/httpd/fastcgi

Create the directories before (re)starting Apache :

mkdir -p /var/run/httpd/fastcgi
chown -R apache:apache /var/run/httpd
chmod 700 -R /var/run/httpd

This way you keep secure log directories and fastcgi ones…

Guillaume Perréal.

Responsable informatique,
Cemagref, groupement de Lyon,
France.

Tél: (+33) 4.72.20.87.87.
Fax: (+33) 4.78.47.78.75.
Site: http://www.lyon.cemagref.fr/