[rt-users] FC4 & FastCGI Help with How-To
Ian Ward
support at cyberpro.com.au
Sun Jul 10 21:49:58 EDT 2005
Hi All,
I am creating a How-To for Fedora Core 4 with FastCGI and having some
problems.
This system has(had) a working 3.2.2 RT install under FC2 and mod_perl2
I have it NEARLY working and just need some help to get it over the line.
RT is working when I do http://server.mydomain.com.au/rt
But I want it running at the root of the server, ie
http://server.mydomain.com ( as it used to be )
I get the dreaded "Almost there" RT if I hit the root directory of the
server.
Can someone help me with the apache configuration so that it will run at
the root (/) of the server.
Also, I do not like the logging locations in the RHEL4 howto and have
modified them.
As I do not have a fully functioning system yet I cannot check the
logging is working
Comment please.
Once I have this sorted I will re-post the howto
TIA, Ian Ward
##### DRAFT 1 ##############
Instructions on how I installed FastCGI on a Fedora Core 4 System.
This came about because we upgraded from FC2 to FC4 and decided to
migrate from mod_perl2 to FastCGI
This system had a working RT 3.2.2 mod_perl2 config before the upgrade
to FC4
( which was a fresh install and restore of /opt + mysql data)
### First the environment
###Make sure httpd-devel is installed....
yum install httpd-devel
###Dependencies Resolved
###<SNIP>
###Installed: httpd-devel.i386 0:2.0.54-10
###Dependency Installed: apr-devel.i386 0:0.9.6-3 apr-util-devel.i386
0:0.9.6-2 pcre-devel.i386 0:5.0-4
###Complete!
### Something I found later, rt-test-dependancies did not pick up FCGI
needed to be installed
perl -MCPAN -e 'install FCGI'
###Get the FastCGI source
cd /tmp
wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
###Configure and Install ( I built in /opt because that is where rt3 is
installed )
cd /opt
tar -zxvf /tmp/mod_fastcgi-2.4.2.tar.gz
cd mod_fastcgi-2.4.2
### Copy the Makefile into place
cp Makefile.AP2 Makefile
###(I think the RHEL4 instructions in the RT/WIKI are in error here)
###(top_dir should be /usr/lib/httpd not /etc/httpd, then module is then
installed in the correct place)
###Modify top_dir from /usr/local/apache2 to /usr/lib/httpd with your
favourite editor..
perl -pi -e 's|/usr/local/apache2|/usr/lib/httpd|g' ./Makefile
###Compile and Install
make
make install
### Allow the logging to go somewhere that makes sense
ln -s /var/log/httpd /usr/lib/httpd/logs
mkdir /var/log/httpd/fastcgi
mkdir /tmp/dynamic
chmod 777 /tmp/dynamic
chmod 777 /var/log/httpd/fastcgi
###Edit /etc/httpd/conf/httpd.conf
###Add line to load FastCGI module:
# LoadModule fastcgi_module modules/mod_fastcgi.so
service httpd start
### Check Apache logs to make sure fastcgi started less
/var/log/httpd/error_log
### Should see no lines with [error] referencing FastCGI
### Should see one line indicating a [notice] and the pid of FastCGI
### [Mon Jul 11 09:53:28 2005] [notice] FastCGI: process manager
initialized (pid 32341)
--------------------------------------------------
That completes the fastcgi install
You now need to reconfigure RT for fastcgi
--------------------------------------------------
The virtual host we used to run RT3 with mod_perl2 looked like this:
<VirtualHost 203.XX.XX.X>
ServerName server.ourdomain.com.au
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8
PerlSetVar MasonArgsMethod CGI
PerlModule Apache2 Apache::compat
RewriteEngine On
RewriteRule ^(.*)/$ $1/index.html
PerlModule Apache::DBI
PerlRequire /opt/rt3/bin/webmux.pl
<Location />
SetHandler perl-script
PerlHandler RT::Mason
</Location>
</VirtualHost>
For FastCGI, we change to this:
<VirtualHost 203.XX.XX.X>
ServerName server.ourdomain.com.au
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8
AddHandler fastcgi-script fcgi
<Directory "/opt/rt3/share/html">
Options FollowSymLinks ExecCGI
AllowOverride None
</Directory>
# Pass through requests to for noauth
Alias /NoAuth/ /opt/rt3/share/html/NoAuth/
</VirtualHost>
FastCgiIpcDir /tmp
FastCgiServer /opt/rt3/bin/mason_handler.fcgi -idle-timeout 120 -processes 4
ScriptAlias /rt /opt/rt3/bin/mason_handler.fcgi
More information about the rt-users
mailing list