Спойлер

воскресенье, 1 ноября 2015 г.

How To Install Nginx With ngx_pagespeed on CentOS

Nginx-Logo
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.

Комментариев нет:

Отправить комментарий