1. Choose to compile and install when installing nginx
  2. Fill in the parameters according to the screenshots and check the custom modules you need during installation.
    --add-module=/www/server/ngx_pagespeed
cd /www/server
wget https://github.com/apache/incubator-pagespeed-ngx/archive/v1.13.35.2-stable.zip
unzip v1.13.35.2-stable.zip
rm v1.13.35.2-stable.zip
NPS_DIR=$(find . -name "*pagespeed-ngx-1.13.35.2-stable" -type d)
mv $NPS_DIR ngx_pagespeed
cd ngx_pagespeed
NPS_RELEASE_NUMBER=${1.13.35.2-stable/stable/}
PSPL_URL=https://dl.google.com/dl/page-speed/psol/${NPS_RELEASE_NUMBER}x64.tar.gz
[ -e scripts/format_binary_url.sh ]
PSPL_URL=$(scripts/format_binary_url.sh PSOL_BINARY_URL)
wget ${PSPL_URL}
tar -xzvf $(basename ${PSPL_URL})
rm $(basename ${PSPL_URL})

2 months later

Is it better to use ubuntu to have these settings? Using "centos 7" is a problem when using webp

    roniel
    It is a way to add custom modules when you compile~ It has nothing to do with the system version.

      how to add this module to existing nginx server

        JAY You can uninstall nginx and reinstall with the module. I did it this way.

        8 days later

        Can help with the process tutorial to install nginx plus headers module?

        @aaPanel_Jose
        can you have make a option while installing nginx have option to select modules and install and have a option under nignx app configuration option to disable and enable modules

          2 months later

          Did anyone take the test with this module?

          Is there really a difference in page loading?

          a month later
          a month later

          i installed ngx_pagespeed module as per upper tutorial but when i check my domain header in chrome or any browser ngx_pagespeed not showing.

          2 months later

          deewinc Hello, this is the tutorial to add the extension, add the extension how to use, you need to learn yourself