How to install mod_fastcgi (FastCGI)in Php-Fpm on Apache 2.4 CentOS

FastCGI

FastCGI functionality is similar to CGI.FastCGI has a bit more configurations when compared to CGI and it is a continuous process and they can process more than one request in a single hit. FastCGI allows running programs on remote machines by multiplexes the environment information, standard input, output and error over a single full-duplex connection

Make sure required packages are installed (httpd-devel and apr-devel required to compile mod_fastcgi)

yum install libtool httpd-devel apr-devel apr

Next, grab the latest mod_fastcgi source code

cd /usr/src

wget --no-check-certificate 'https://drive.google.com/open?id=1g35oxbKNyksIsdIiT6oYHfGVSW12AkJf' -O mod_fastcgi-master.zip

Enter into downloaded Folder

cd mod_fastcgi-master

Make a copy of Makefile.AP2

cp Makefile.AP2 Makefile

How to find your linux machine is 32bit or 64 bit use these commands to identify:

uname -m

For 32 bit it will list output as

i586 or i386 or i686

For 64 bit it will list output as

x86_64

Compile and install mod_fastcgi for 32 bit system use these commands:

1.make top_dir=/usr/lib/httpd
2.make install top_dir=/usr/lib/httpd

 

Compile and install mod_fastcgi for 64 bit system use these commands:

1. make top_dir=/usr/lib64/httpd
2. make install top_dir=/usr/lib64/httpd

 

Sample output after running 2 Comment :

make install top_dir=/usr/lib64/httpd
make[1]: Entering directory `/tmp/mod_fastcgi-2.4.6′
/usr/lib64/apr-1/build/libtool –silent –mode=install cp mod_fastcgi.la /usr/lib64/httpd/modules/
make[1]: Leaving directory `/tmp/mod_fastcgi-2.4.6′

Configure mod_fastcgi

Open /etc/httpd/conf.d/mod_fastcgi.conf file

vi /etc/httpd/conf.d/mod_fastcgi.conf

Add an entry to it like this

LoadModule fastcgi_module modules/mod_fastcgi.so

Save and close the file. Restart httpd, enter:

service httpd restart

 

Leave a Reply

Your email address will not be published. Required fields are marked *