How To Install Nginx With PHP-FastCGI on CentOS 6

Install Nginx With PHP-FastCGI on CentOS 6

In this tutorial, we will show you how to install Nginx With PHP-FastCGI on CentOS 6. For those of you who didn’t know, Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or a reverse proxy.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Nginx with fast-CGI on CentOS 6.

Install Nginx With PHP-FastCGI on CentOS 6

Step 1. To install, first, you must add the EPEL yum repository information corresponding to your CentOS/RHEL version.

Step 2. Install Nginx package and dependencies.

Step 3. Install the required PHP packages.

Step 4. Install spawn-fcgi.

Configure the Fast-CGI init script:

Step 5. Configure Nginx web server.

Step 5. Start Nginx and PHP-FastCGI service.

Important: For security reasons, you’ll want to change/add the following line to /etc/php.ini and restart Nginx:

Congratulations! You have successfully installed Nginx and PHP-FastCGI. Thanks for using this tutorial for installing Nginx and PHP-FastCGI on CentOS 6 systems.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!