How To Install Nginx With ngx_pagespeed on CentOS

r00t December 23, 2014

Install Nginx With ngx_pagespeed on CentOS

For those of you who didn’t know, PageSpeed (ngx_pagespeed) is a Nginx module created by Google to help Make the Web Faster by rewriting web pages to reduce latency and bandwidth. For the installation, we will need to compile nginx from souce with the PageSpeed module, as Nginx doesn’t support Dynamic module loading (DSO), unless you want to build your own rpm or deb files. 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.

Install Nginx With ngx_pagespeed on CentOS

Step 1. Install dependencies

Step 2. Download and install ngx_pagespeed and PSOL (PageSpeed Optimization Libraries) source code as follows.

Step 3. Download the latest stable version of Nginx from here and build it with ngx_pagespeed support.

Step 4. You can verify that ngx_pagespeed module has been added to Nginx installation using the following command

Step 5. Configure ngx_pagespeed module in Nginx

Step 6. Create a file cache directory which will be written by Nginx.

Step 7. Create an init script for Nginx.
Step 8. Finally, start Nginx.

Congratulation’s! You have successfully installed Nginx with ngx_pagespeed. Thanks for using this tutorial for installing Nginx with ngx_pagespeed on CentOS system. For additional help or useful information, we recommend you to check the official Nginx web site.

Nginx 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 “Nginx Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!

Save

Share on Google+2Share on Facebook0Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon1Share on Reddit1Pin on Pinterest2
The Tags:

Leave a Comment