Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build nginx with Google PageSpeed, Brotli and other modules
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'
@deweydb

This comment has been minimized.

Copy link

commented Feb 3, 2017

Where does ${PS_NGX_EXTRA_FLAGS} actually get set? or is it just empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.