Nginx quic (http3) and pagespeed from sources howto

Some deps:
dev-utils
c-basic
go-basic
devpkg-pcre

Compiling BoringSSL

git clone boringssl - Git at Google

cd boringssl
mkdir build
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 …
ninja

OK
Time to compile nginx-quic (with pagespeed integrated if you want)

From your home or other directory:
hg clone -b quic https://hg.nginx.org/nginx-quic
cd nginx-quic

Copy all libs from boringssl to correct directorys
cp -rf /home/$user/boringssl/include /usr/
cp -rf /home/$user/boringssl/build/ssl/libssl.so /lib64/
cp -rf /home/$user/boringssl/build/crypto/libcrypto.so /lib64/

If you don’t want pagespeed skip above step
Got steps from Build ngx_pagespeed From Source
Remember: the nginx version to use you already downloaded in first step.
In auto configure, just make some ajusts:
./auto/configure --add-module=/home/$user/incubator-pagespeed-ngx-1.13.35.2-stable$nps_dir --with-http_v2_module --with-http_v3_module --with-cc-opt=“-I /home/$user/boringssl/include/openssl” --with-ld-opt=“-L/home/$user/boringssl/build/ssl -L/home/$user/boringssl/build/crypto”

If you just want Nginx with quic:
./auto/configure --with-http_v2_module --with-http_v3_module --with-cc-opt=“-I /home/$user/boringssl/include/openssl” --with-ld-opt=“-L/home/$user/boringssl/build/ssl -L/home/$user/boringssl/build/crypto”

make -j 8 (i use the double of cores)

sudo make install

the files will be place in /usr/local/nginx.
enter in sbin and test the binary:
./nginx

you should see on top, htop, ps -aux, netstat -a or sockstat
OpenSSL don’t support quic.

This is experimental.

2 Likes