Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > Suggestions > Topic : nginx brotli and http3/quic



Threaded Mode | Print  

 nginx brotli and http3/quic (0 Replies, Read 84 times)
myipgr
Group: Member
Post Group: Newbie
Posts: 3
Status:
Any chances to compile nginx with brotli support and http3/quic and maybe configurable cache options?
Using from source with success:
Code

  --with-pcre-jit \
  --with-threads \
  --with-file-aio \
  --with-http_ssl_module \
  --with-http_v2_module \
  --with-http_v3_module \
  --with-http_realip_module \
  --with-http_stub_status_module \
  --with-stream \
  --with-stream_ssl_module \
  --with-stream_realip_module \
  --with-stream_ssl_preread_module \
  --with-http_gzip_static_module \
  --add-module="${SRC_DIR}/ngx_brotli" \
  --with-openssl="${SRC_DIR}/openssl-${OPENSSL_VER}" \
  --with-openssl-opt="enable-quic no-shared no-tests" \
  --with-cc-opt="-I${SRC_DIR}/ngx_brotli/deps/brotli/c/include -Wno-error=sign-compare -Wno-sign-compare"


And in templates something like:
Code
    # Global HTTP/3 Settings (defaults)
    http3 on;
    quic_gso on;
    quic_retry on;

    # Gzip & Brotli
    gzip_vary on;
    gzip on;
    gzip_static on;
    brotli on;
    brotli_comp_level 6;
    brotli_static on;
    brotli_types text/plain text/css application/javascript application/json image/svg+xml;


open_file_cache          max=1000 inactive=10m;
open_file_cache_valid    60s;
open_file_cache_min_uses 1;
open_file_cache_errors  on;




server {
    listen 443 quic reuseport;
    server_name _;

    ssl_certificate    xxx
    ssl_certificate_key xxx

    ssl_protocols TLSv1.3;
    http3 on;

    return 444;
}


    # Cache keys
    proxy_cache_key  "$scheme$request_method$host$request_uri";
    fastcgi_cache_key "$scheme$request_method$host$request_uri";


    proxy_cache_path xxx
        levels=1:2 keys_zone=proxy_micro:20m max_size=512m inactive=60m use_temp_path=off;

    proxy_cache_path xxx
        levels=1:2 keys_zone=proxy_static:50m max_size=5g inactive=30d use_temp_path=off;

    fastcgi_cache_path xxx
        levels=1:2 keys_zone=php_cache:50m inactive=60m max_size=5g;


}


and vhost triggers:

Code

server {
    listen 443 ssl;
    # Advertise HTTP/3 to clients that connect over TCP first
    add_header Alt-Svc 'h3=":443"; ma=86400' always;

    http2 on;


# HTTPS (UDP 443 - HTTP/3)
server {
    listen 443 quic;
    http3 on;


Then we could enable it / disable it from API / UI
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is January 22, 2026, 1:16 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.011