Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

quick and dirty build instructions #1760

@eilandert

Description

@eilandert

On popular demand, build instructions

This should take care of both the glibc issue and the changed api in nginx 1.23.0+
This PSOL library is build from git, commit 409bd76 and is numbered 1.15.0.0-8917
(after commit 409bd76/11 apr 2020 I can't build PSOL anymore because of the move to Bazel, never got that to work)

Don't forget builddependencies like uuid-dev (apt install uuid-dev)

If you are on a newer glibc (2.33+) you need psol-jammy.tar.xz, if you are on an older glibc you can try psol-focal.tar.xz, psol-bionic.tar.xz, psol-xenial.tar.xz or even psol-trusty.tar.xz. The ubuntu name indicates on which system I compiled the library, you can use it on debian, centos or whatever distro, you are not limited to ubuntu. (but you are limited to x64)

You can use any combination of NGINX_VERSION and PSOL.

#!/bin/sh
NGINX_VERSION="1.23.1"
PSOL="jammy"
mkdir -p /opt/build-pagespeed
cd /opt/build-pagespeed
wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
wget http://www.tiredofit.nl/psol-${PSOL}.tar.xz
git clone --depth=1 https://github.com/apache/incubator-pagespeed-ngx.git
tar xvf psol-${PSOL}.tar.xz
mv psol incubator-pagespeed-ngx
tar zxvf nginx-${NGINX_VERSION}.tar.gz
cd nginx-${NGINX_VERSION}
./configure --with-compat --add-dynamic-module=../incubator-pagespeed-ngx
make modules

If you do: ls objs
you should see ngx_pagespeed.so
How to handle the .so is left as exercise for the reader.

If there is any error or missing dependency, you should be able to figure it out from objs/autoconf.err

I have precompiled packages here: https://deb.myguard.nl/nginx-modules/ (debian and ubuntu)
Launchpad (ubuntu only): https://launchpad.net/~eilander/+archive/ubuntu/nginx.
Docker: https://hub.docker.com/r/eilandert/nginx-modsecurity3-pagespeed
My contact information is also on those links

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions