Last active
February 9, 2022 13:23
-
-
Save HeikoMamerow/45d82ec557b86f9d3d6e6f547770429f to your computer and use it in GitHub Desktop.
Build nginx with Google PageSpeed, Brotli and other modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to build your custom Nginx | |
============================== | |
Works fine for me with Ubuntu 16.04. | |
Automated Install with pagespeed module (Google) | |
------------------------------------------------ | |
If you interested, read the original | |
Source: https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source | |
-------------8<---------------------- | |
# Before we start, lets clean old stuff | |
cd | |
rm -rf nginx-* ngx_brotli* master.* ngx_* nginx_a* release-* v1.1* | |
# Brotli | |
cd | |
git clone https://github.com/google/ngx_brotli.git | |
cd ngx_brotli | |
git submodule update --init --recursive | |
# Accept Language module | |
cd | |
wget https://github.com/giom/nginx_accept_language_module/archive/master.zip | |
unzip master.zip | |
# Pagespeed module + Nginx + modules | |
cd | |
bash <(curl -f -L -sS https://ngxpagespeed.com/install) \ | |
--nginx-version latest \ | |
--ngx-pagespeed-version latest-beta \ | |
--additional-nginx-configure-arguments '--add-module=$HOME/ngx_brotli --add-module=$HOME/nginx_accept_language_module-master --prefix=/usr/local/share/nginx --conf-path=/etc/nginx/nginx.conf --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_perl_module --with-http_stub_status_module --sbin-path=/usr/local/sbin --error-log-path=/var/log/nginx/error.log' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
i am getting this error
`checking for psol-compiler-compat ... found
adding module in /root/ngx_brotli
adding module in /root/nginx_accept_language_module-master
./configure: error: no /root/nginx_accept_language_module-master/config was found
Error: Failure running './configure --add-module=/root/incubator-pagespeed-ngx-latest-beta --add-module=/root/ngx_brotli --add-module=/root/nginx_accept_language_module-master --prefix=/usr/local/share/nginx --conf-path=/etc/nginx/nginx.conf --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_perl_module --with-http_stub_status_module --sbin-path=/usr/local/sbin --error-log-path=/var/log/nginx/error.log', exiting.`