• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

Compile and Install Nginx With the PageSpeed Module on Debian 8

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
133
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Manual installation
    1. Compilation and installation of Nginx
  3. Automatic installation
  4. Want to contribute?


In this article, we will see how to compile and install Nginx mainline from the official sources of Nginx with the PageSpeed module, which allows you to accelerate your website through several filters. These filters act on HTML, images, CSS or Javascript.

Prerequisites

  • A newly deployed Vultr instance running Debian 8.
  • A sudo user.

Manual installation

Update the system.

sudo apt-get update
sudo apt-get dist-upgrade

Install dependencies.

sudo apt install build-essential ca-certificates zlib1g-dev libpcre3 libpcre3-dev tar unzip libssl-dev

Define a variable with the latest version of the PageSpeed module.

NPS_VER=1.13.35.2

Next, we need to download and extract the source code for ngx-pagespeed.

cd /opt
wget https://github.com/pagespeed/ngx_pagespeed/archive/v${NPS_VER}-beta.zip
unzip v${NPS_VER}-beta.zip
rm v${NPS_VER}-beta.zip
cd ngx_pagespeed-${NPS_VER}-beta
psol_url=https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz
[ -e scripts/format_binary_url.sh ] && psol_url=$(scripts/format_binary_url.sh PSOL_BINARY_URL)
wget ${psol_url}
tar -xzvf $(basename ${psol_url})
rm ${NPS_VER}-x64.tar.gz

Compilation and installation of Nginx

Define a variable with the latest version of Nginx.

NGINX_VER=1.9.9

Or define it via the Nginx website.

NGINX_VER=$(curl -s http://nginx.org/en/CHANGES | awk 'NR==2' | awk '{print $4}')

Next, we need to download the source code for Nginx.

cd /opt
wget -qO- http://nginx.org/download/nginx-${NGINX_VER}.tar.gz | tar zxf -

Configure the parameters and modules. The Nginx PageSpeed module is included.

cd nginx-${NGINX_VER}
./configure /
--prefix=/etc/nginx /
--sbin-path=/usr/sbin/nginx /
--conf-path=/etc/nginx/nginx.conf /
--error-log-path=/var/log/nginx/error.log /
--http-log-path=/var/log/nginx/access.log /
--pid-path=/var/run/nginx.pid /
--lock-path=/var/run/nginx.lock /
--http-client-body-temp-path=/var/cache/nginx/client_temp /
--http-proxy-temp-path=/var/cache/nginx/proxy_temp /
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp /
--user=nginx /
--group=nginx /
--without-http_ssi_module /
--without-http_scgi_module /
--without-http_uwsgi_module /
--without-http_geo_module /
--without-http_map_module /
--without-http_split_clients_module /
--without-http_memcached_module /
--without-http_empty_gif_module /
--without-http_browser_module /
--with-threads /
--with-file-aio /
--with-http_ssl_module /
--with-http_v2_module /
--with-ipv6 /
--with-http_mp4_module /
--with-http_auth_request_module /
--with-http_slice_module /
--add-module=/opt/ngx_pagespeed-release-${NPS_VER}-beta

Compile.

make -j $(nproc)

Install.

make install

You can verify that the ngx_pagespeed module has been added to Nginx installation as follows.

/usr/local/nginx/sbin/nginx -V

Automatic installation

Get the automation script, which allows you to install several modules, including the PageSpeed module.

wget --no-check-certificate https://raw.githubusercontent.com/Qoraiche/nginx-including-pagespeed/master/nginx-autoinstall.sh -O nginx-autoinstall.sh

Make it executable.

chmod +x nginx-autoinstall.sh

Execute it.

./nginx-autoinstall.sh

Your Nginx PageSpeed module installation is now complete.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Matomo Analytics on Debian 9

Next Post

How to Install ProcessWire CMS 3.0 on a Debian 9 LAMP VPS

Next Post

How to Install ProcessWire CMS 3.0 on a Debian 9 LAMP VPS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet