FastCGI functionality is very similar to working of CGI. Lost in space sound holic. FastCGI makes differences at few places than CGI like FastCGI processes are persistent and they can handle more than one requests per processes. FastCGI allows running programmes on remote machines by multiplexes the environment information, standard input, output and error over a single full-duplex connection. About FastCGI. • This tutorial will help you to setup Apache web server with PHP and FastCGI on Red Hat based systems. Step 1 – Setup Yum Repositories Fast of all, enable REMI and EPEL yum repositories on your system. These repositories provide lastest packages for RedHat based systems. • Step 2 – Install Apache2 Apache2 packages are available with name HTTPD for Redhat based systems. You can use following commands to install latest available Apache2 (HTTPD) packages in configured repositories on your system. Yum install httpd Step 3 – Install PHP and FastCGI After installing Apache web server, let’s install PHP and FastCGI Apache module on your system. You can install any version of required PHP or simply use the following command to install available PHP packages. This tutorial doesn’t include installing PHP modules, So you can also install required PHP modules. Yum install php php-cli mod_fcgid Step 4 – Disable Default PHP Handler Before using PHP/FastCGI handler, you have to disable default PHP handler on your system. Edit PHP configuration file for Apache ( /etc/httpd/conf.d/php.conf) in your favorite text editor and comment following lines showing in below screenshot by adding the hash (#) sign at the start of the lines. Step 5 – Setup FastCGI Handler At this point we have successfully installed Apache FastCGI Module. ![]() ![]() Now nagigate to /var/www/cgi-bin directory, If not exists create directory. Then create a php.fastcgi file and add the following content to this file. Also make sure the php.ini file and php-cgi exist on your system. Vim /var/www/cgi-bin/php.fastcgi #!/bin/bash PHPRC='/etc/php.ini' PHP_FCGI_CHILDREN=4 PHP_FCGI_MAX_REQUESTS=1000 export PHPRC export PHP_FCGI_CHILDREN export PHP_FCGI_MAX_REQUESTS exec /usr/bin/php-cgi Change permissions of php.fastcgi script to make it executable by Apache server. Apr 30, 2014 - apt-get -y install apache2-suexec-custom. Root@www:~# a2enmod suexec. Enabling module suexec. Xander apps download. To activate the new configuration, you. Chown apache:apache /var/www/cgi-bin/php.fastcgi chmod +x /var/www/cgi-bin/php.fastcgi Step 6 – Setup VirtualHost with FastCGI Finally, create a VirtualHost in our Apache configuration file with FastCGI support. VirtualHosts are used to configure multiple sites with single IP. Below configuration will allow siting svr1.tecadmin.net with any system IP on port 80. ServerName svr1.tecadmin.net ServerAdmin DocumentRoot /var/www/html ScriptAlias /cgi-bin/ '/var/www/cgi-bin/' Options +Indexes +FollowSymLinks +ExecCGI AddHandler php-fastcgi.php Action php-fastcgi /cgi-bin/php.fastcgi AllowOverride All Order allow,deny Allow from All Step 7 – Restart Apache and Test Setup At this point, you have completed Apache configuration with FastCGI support. Let’s restart Apache server using the following command. Service httpd restart Now create a file in your document root /var/www/html/info.php and add following content to check detailed php information. Hi, being around in the internet long enough makes you aware that tons and tons of tutorials out there won’t really work, probably cause they weren’t clear enough about their environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |