How To Install Nginx With PHP-FastCGI on CentOS 6

r00t March 17, 2015

Nginx-Logo

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.

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 required php packages.

Step 4. Install spawn-fcgi.

Configure 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:

Congratulation’s! 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 a best deal!
Share on Google+0Share on Facebook0Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon1Share on Reddit1Pin on Pinterest1
The Tags:

Leave a Comment