Automated packaging of Debian-flavored NGINX with PageSpeed modules. Written in Bash and GitHub Workers. APT Repository hosted on Dokku.

Overview

NGINX + Google PageSpeed

Configuring NGINX to build correctly is a pain. Not because of anything wrong with it, but rather because of how slim the standard install is: no HTTPS, no Web-Sockets, no PAM, etc., since they are all independent modules. While this is sound in principle, it's inconvenient for end-users.

Luckily, most distributions fork it, make a few changes and bundle it with everyone's favorite modules. Installing NGINX from your distribution's repositories will always give you a batteries-included configuration. This convenience presents a dilemma: either accept what your distribution gives you and lose the flexibility of customizing your installation or bite the bullet and try to figure everything out yourself.

I could no longer accept the default installation once I decided to have Google PageSpeed on my servers. If you're on this repository, I don't think I need to explain the benefits. In short, Mod PageSpeed is a collection of filters that apply optimizations to content going through it such as compression, minification, conversion to modern formats, lazy-loading, and more.

There was painfully little documentation on the topic of forking a Debian package, but I managed to piece it together. This repository is the result: a seamless way to substitute Debian-flavored NGINX with Debian-flavored NGINX + PageSpeed. Enjoy!

Installation

This installation guide aims to support any modern Debian-based system (including Ubuntu). Open an issue if it doesn't work. The Debian packages are built on Ubuntu 20.04, and should be compatible with newer releases.

Download Keys

The GitHub worker signs the packages using the key below. You need to trust them to be able to install the packages.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8028BE1819F3E4A0

Connect Source

Create /etc/apt/sources.list.d/nginx-pagespeed.list and put the following line into it:

deb https://nginx-pagespeed.knyz.org/dist/ /

This will enable apt to find the PageSpeed-patched versions of NGINX.

Pin Source

To prevent other sources from overwriting NGINX during updates, pin it by creating /etc/apt/preferences.d/99nginx-pagespeed and placing the following inside of it:

Package: *
Pin: origin http://nginx-pagespeed.knyz.org/
Pin-Priority: 900

This will make apt unconditionally prefer PageSpeed-patched versions of NGINX.

Installing

  • Run sudo apt update, look out for any errors.
  • Run apt-cache policy nginx-full, validate that the selected candidate is from nginx-pagespeed.knyz.org.
  • Run sudo apt install nginx-full, or nginx-light depending on what you're looking for

Done!

Usage

There are more than enough guides around PageSpeed. My recommended setup is to place the following file into /etc/nginx/conf.d/pagespeed.conf:

pagespeed on;
pagespeed FileCachePath              "/var/cache/pagespeed/";
pagespeed FileCacheSizeKb            102400;
pagespeed FileCacheCleanIntervalMs   3600000;
pagespeed FileCacheInodeLimit        500000;
pagespeed RewriteLevel CoreFilters;

Remember to run sudo systemctl reload nginx after any changes.

Comments
  • Builds Failing due to substition module

    Builds Failing due to substition module

    As of writing this, we are almost a month behind master.

    Here are some links I think are related:

    https://github.com/yaoweibin/ngx_http_substitutions_filter_module/search?q=NGX_PCRE2 https://salsa.debian.org/search?search=NGX_PCRE2&group_id=2273&project_id=1063&scope=&search_code=true&snippets=false&repository_ref=master&nav_source=navbar

    opened by vezaynk 2
  • Implement a test CI step

    Implement a test CI step

    The breakage introduced by #2 bothers me. My fix causes a divergence from salsa, and it makes me concerned that it will cause a binary incompatibility somewhere.

    I want to setup a GitHub action that includes:

    • Adding the deb repository
    • Installing nginx
    • Testing a configuration that includes:
      • nginx-pagespeed rules
      • http-sub-filter rules
    • Checks if everything is valid using nginx -T
    opened by vezaynk 1
  • APT install breaking

    APT install breaking

    The dependencies we need to building nginx seem to no longer be inter-compatible. Will need to trace what depends on what... what a headache.

    Seems similar to:

    • https://github.com/actions/virtual-environments/issues/2139

    Logs:

    Run sudo apt install -y debhelper/focal-backports libdebhelper-perl/focal-backports libgd-dev libgeoip-dev libhiredis-dev libluajit-5.1-dev libmaxminddb-dev libmhash-dev libpam0g-dev libpcre3-dev libpcre2-dev libperl-dev libpcre++-dev libssl-dev libxslt1-dev po-debconf quilt zlib1g-dev dpkg-dev libexpat-dev wget git gpg
    
    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
    
    Reading package lists...
    Building dependency tree...
    Reading state information...
    dpkg-dev is already the newest version (1.19.7ubuntu3.2).
    dpkg-dev set to manually installed.
    gpg is already the newest version (2.2.19-3ubuntu2.2).
    gpg set to manually installed.
    libexpat1-dev is already the newest version (2.2.9-1ubuntu0.4).
    libexpat1-dev set to manually installed.
    libpcre3-dev is already the newest version (2:8.39-12ubuntu0.1).
    libpcre3-dev set to manually installed.
    libssl-dev is already the newest version (1.1.1f-1ubuntu2.16).
    wget is already the newest version (1.20.3-1ubuntu2).
    zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1.3).
    git is already the newest version (1:2.37.1-0ppa1~ubuntu20.04.1).
    libpcre2-dev is already the newest version (10.40-1+ubuntu20.04.1+deb.sury.org+1).
    libpcre2-dev set to manually installed.
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     libgd-dev : Depends: libgd3 (= 2.2.5-5.2ubuntu2.1) but 2.3.3-5+ubuntu20.04.1+deb.sury.org+1 is to be installed
    E: Unable to correct problems, you have held broken packages.
    Error: Process completed with exit code 100.
    
    opened by vezaynk 0
  • make: *** [Makefile:16: modules] Error 2 when compiling module only against patch aarch64 PSOL Libraries

    make: *** [Makefile:16: modules] Error 2 when compiling module only against patch aarch64 PSOL Libraries

    I am running Ubuntu 20.04 Server, and attempting to compile this module against nginx mainline 1.23.1. Howver, there are errors when using the make command. Please see details below or check https://pastebin.com/qYksN26k.

    This is the pagespeed "make" command being compiled against a patched PSOL Library for aarch64 on raspberry pi 4. We are compiling with Nginx Mainline 1.23.1. Locate the patched library at: https://gitlab.com/gusco/ngx_pagespeed_arm. This #make is broken and needs to be updated by developers.

    make modules
    make -f objs/Makefile modules
    make[1]: Entering directory '/usr/local/src/nginx-1.23.1'
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/log_message_handler.o \
        /usr/local/src/incubator-pagespeed-ngx/src/log_message_handler.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_base_fetch.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_base_fetch.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_caching_headers.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_caching_headers.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_event_connection.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_event_connection.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_fetch.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_fetch.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_gzip_setter.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_gzip_setter.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_list_iterator.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_list_iterator.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_message_handler.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_message_handler.cc
    cc -c -fPIC -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.23.1/debian/debuild-base/nginx-1.23.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC  -D_GLIBCXX_USE_CXX11_ABI=0 --std=c++11 -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/incubator-pagespeed-ngx/psol/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/chromium/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/google-sparsehash/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/grpc/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/protobuf/src/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/re2/src -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen -I /usr/local/src/incubator-pagespeed-ngx/psol/include/out/Release/obj/gen/protoc_out/instaweb -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/src/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/apr/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/third_party/aprutil/gen/arch/linux/aarch64/include -I /usr/local/src/incubator-pagespeed-ngx/psol/include/url -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream \
        -o objs/addon/src/ngx_pagespeed.o \
        /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc
    /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc: In function ‘ngx_int_t net_instaweb::{anonymous}::ps_set_cache_control(ngx_http_request_t*, char*)’:
    /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:407:36: error: request for member ‘elts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
      407 |   if (r->headers_out.cache_control.elts == NULL) {
          |                                    ^~~~
    /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:408:35: error: cannot convert ‘ngx_table_elt_t**’ {aka ‘ngx_table_elt_s**’} to ‘ngx_array_t*’
      408 |     ngx_int_t rc = ngx_array_init(&r->headers_out.cache_control, r->pool,
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                   |
          |                                   ngx_table_elt_t** {aka ngx_table_elt_s**}
    In file included from src/core/ngx_core.h:65,
                     from src/http/ngx_http.h:13,
                     from /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.h:33,
                     from /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:26:
    src/core/ngx_array.h:32:29: note:   initializing argument 1 of ‘ngx_int_t ngx_array_init(ngx_array_t*, ngx_pool_t*, ngx_uint_t, size_t)’
       32 | ngx_array_init(ngx_array_t *array, ngx_pool_t *pool, ngx_uint_t n, size_t size)
          |                ~~~~~~~~~~~~~^~~~~
    /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:415:22: error: cannot convert ‘ngx_table_elt_t**’ {aka ‘ngx_table_elt_s**’} to ‘ngx_array_t*’
      415 |       ngx_array_push(&r->headers_out.cache_control));
          |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                      |
          |                      ngx_table_elt_t** {aka ngx_table_elt_s**}
    In file included from src/core/ngx_core.h:65,
                     from src/http/ngx_http.h:13,
                     from /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.h:33,
                     from /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:26:
    src/core/ngx_array.h:27:35: note:   initializing argument 1 of ‘void* ngx_array_push(ngx_array_t*)’
       27 | void *ngx_array_push(ngx_array_t *a);
          |                      ~~~~~~~~~~~~~^
    /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc: In function ‘bool net_instaweb::{anonymous}::ps_get_cache_control(ngx_http_request_t*, GoogleString*)’:
    /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:439:74: error: request for member ‘elts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
      439 |   auto ccp = static_cast<ngx_table_elt_t**>(r->headers_out.cache_control.elts);
          |                                                                          ^~~~
    /usr/local/src/incubator-pagespeed-ngx/src/ngx_pagespeed.cc:444:59: error: request for member ‘nelts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
      444 |   for (ngx_uint_t i = 0; i < r->headers_out.cache_control.nelts; i++) {
          |                                                           ^~~~~
    make[1]: *** [objs/Makefile:1975: objs/addon/src/ngx_pagespeed.o] Error 1
    make[1]: Leaving directory '/usr/local/src/nginx-1.23.1'
    make: *** [Makefile:16: modules] Error 2
    
    opened by Danrancan 0
  • nginx-extras is failing to install

    nginx-extras is failing to install

    https://github.com/knyzorg/nginx-pagespeed/runs/7016768059?check_suite_focus=true

    I'm not sure if this is due to my repository, or if upstream is behaving like this as well 🤔

    image

    opened by vezaynk 0
Owner
Slava Knyazev
⚙️ Sometimes I have good ideas
Slava Knyazev
Modren is a modern store for Linux. It includes support for snaps, flatpaks from Flathub, APT packages and DEBs.

v1.0.0 Made with ❤️ for ?? Modren is a modern store for Linux. It includes support for snaps, flatpaks from Flathub, APT packages and DEBs. Download ·

Rudra Saraswat 82 Nov 18, 2022
A WASM shell parser and formatter with bash support, based on mvdan/sh

sh-syntax A WASM shell parser and formatter with bash support, based on mvdan/sh TOC Usage Install API Changelog License Usage Install # yarn yarn add

RxTS 7 Jan 1, 2023
shell script replacement; write shell scripts in js instead of bash, then run them with a single static binary

yavascript YavaScript is a bash-like script runner which is distributed as a single statically-linked binary. Scripts are written in JavaScript. There

Lily Scott 59 Dec 29, 2022
GPT-3 powered cli tool to help with bash commands you can't remember

qwery GPT-3 powered cli tool to help with bash commands you can't remember eg $ qw ffmpeg command to transcode mp4 to mov QWERY RESULT: ffmpeg -i inpu

Aaron Peddle 4 Oct 31, 2022
My-portfolio - Built with Namecheap, Digital Ocean, Nginx, PM2, SSL, NextJs, Tailwind 3, Graphql, NexusJS, Prisma, Postgres, Passion and Love

Current Implementation technologies Nextjs with Typescript. Static pages/ Server side rendering. Easy peasy state management (Might not need it with i

Samrood Ali 1 Jan 10, 2022
API of my readings, developed in Nest.js, MongoDB, Nginx and Dockerized

My Readings step by step for configuration with docker OBS: required docker and docker-compose cp -r .env.sample .env docker-compose up example what t

William Koller 30 Jul 1, 2022
A secure MERN Stack boilerplate ready for Production that uses Docker & Nginx.

A production ready & secure boilerplate for the MERN Stack that uses Docker & Nginx. Focus on the product and not the setup. You can directly start wo

Karan Jagtiani 34 Dec 23, 2022
Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

null 12 May 20, 2022
This project is based on the Awesome Books app repo, refactored with ES6 and organized with modules. The purpose of this project is to learn functionality organization using JavaScript modules.

Awesome Books with ES6 and modules A basic app project built with HTML, CSS and JS ES6 to keep track of awesome books. Built With HTML/CSS and JS best

Karla Delgado 10 Aug 27, 2022
Automatically sync your leetcode solutions to your github account - top 5 trending GitHub repository

LeetHub - Automatically sync your code to GitHub. Top 5 Trending JavaScript Repositories Available on: What is LeetHub? A chrome extension that automa

Qasim Wani 2.8k Dec 31, 2022
CDK constructs for self-hosted GitHub Actions runners

GitHub Self-Hosted Runners CDK Constructs Use this CDK construct to create ephemeral self-hosted GitHub runners on-demand inside your AWS account. Eas

CloudSnorkel 134 Dec 20, 2022
A serverless guestbook hosted on Github Pages. Powered for free by Google.

Serverless-Guestbook Features: 100% free, pure CSS form validation, profanity filter, lightweight, easy to setup & easy to use! Don't forget to check

Marketing Pipeline 9 Dec 20, 2022
Import flow for Excel (.xlsx) and CSV file with automated column matching and validation.

RSI react-spreadsheet-import ⚡️ A component used for importing XLS / XLSX / CSV documents built with Chakra UI. Import flow combines: ?? Uploader ⚙️ P

Ugnis 123 Dec 24, 2022
This repo contains the templates used in my automated obsidian weekly review video and also an accompanying vault with the folder structure expected and plugins

This repo contains the templates used in my automated obsidian weekly review video and also an accompanying vault with the folder structure expected and plugins (periodic note settings etc)

Pamela Wang 53 Dec 21, 2022
An automated crawler that extracts products and categories from Digikala!

Digikala-Crawler The purpose of this project is to conduct research and we are not responsible for any misuse of this project. This is not a very clea

Ali Azizi 5 Feb 16, 2022
🧩 Sokoban game and automated puzzle solver

?? sokoban My blog post: Building and Solving Sokoban A Sokoban game built with Next.js — skinned with Boxxle sprites, and packaged with 40 tiny eloqu

Andrew Healey 3 Jun 8, 2022
Automated testing for single-page applications (SPAs). Small, portable, and easy to use. Click on things, fill in values, await for things exist, etc.

SPA Check Automated testing for single-page applications (SPAs). Small, portable, and easy to use. Click on things, fill in values, await for things e

Cory Leigh Rahman 5 Dec 23, 2022
Purple hats Desktop is a customisable, automated web accessibility testing tool that allows software development teams to find and fix accessibility problems to improve persons with disabilities (PWDs) access to digital services.

Purple HATS Desktop Purple hats Desktop is a desktop frontend for Purple HATS accessibility site scanner - a customisable, automated web accessibility

Government Digital Services, Singapore 6 May 11, 2023
基于 gh-proxy + Jsdelivr+ cnpmjs + cloudflare workers 的 GitHub Serverless API 工具。

better-github-api Better, Eazy, Access Anywhere 介绍 基于 gh-proxy + Jsdelivr + cnpmjs + cloudflare workers 的 GitHub Serverless API 工具。 cdn.js:仅含 gh-proxy

One Studio 11 Nov 23, 2022