Angie Web Server

repository·master·Indexed 25 days ago

https://github.com/webserver-llc/angie

A high-performance, scalable web server forked from nginx and designed as a drop-in replacement. Angie maintains nginx compatibility while adding advanced features including production-ready HTTP/3, built-in ACME support for automatic HTTPS, DNS over HTTPS (DoH), dynamic Docker upstreams, and enhanced observability via a RESTful API and Prometheus integration.

Tokens
2.6K
Snippets
6
Records
17
Agent score
82%

What's inside Angie

  1. Overview of Angie features

    master

    Angie builds upon the capabilities of nginx 1.31.2 and introduces several advanced features across multiple categories:

    Protocols & Connectivity

    • Production-ready HTTP/3: Supports both client and proxied server connections, allowing independent protocol versions (HTTP/1.x, HTTP/2, HTTP/3) on opposite sides.
    • DNS over HTTPS (DoH): Built-in RFC 8484 server module for proxying DNS queries via HTTP/HTTPS to UDP/TCP server groups.
    • PROXY Protocol V2: Supports passing arbitrary TLV values.
    • MQTT & RDP Support: Enhanced authorization/balancing for MQTT and session cookie-based balancing for RDP.
    • Mail Proxy: Supports XOAUTH2 and OAUTHBEARER authentication.

    TLS & Certificate Management

    • Automatic HTTPS: Built-in ACME support (HTTP, DNS, and ALPN challenges) for multi-domain, wildcard, and IP certificates, including ACME profiles and EAB.
    • TLS 1.3 Early Data (0-RTT): Supported in both HTTP and stream modules.
    • NTLS Support: Enabled via the Tongsuo TLS library at build time.

    Load Balancing & Upstream

    • Dynamic Docker Upstreams: Update upstream groups based on Docker/Podman container events without server reloads.
    • Response-Time-Aware Load Balancing: Uses a probability-based algorithm to distribute traffic based on measured average response times.
    • Enhanced Session Binding: Supports session binding for both HTTP and stream upstreams, including learn and drain modes.
    • Slow Start: Recommissions upstream servers smoothly after failure in both HTTP and stream upstreams.

    Observability & Monitoring

    • RESTful API: Exposes configuration and metrics (connections, shared memory, TLS, etc.) in JSON format.
    • Prometheus Integration: Exports statistics in Prometheus format with customizable templates.
    • Console Light: A visual monitoring tool accessible via the browser.
    • Metric Module: Real-time statistics collection for HTTP and stream traffic (counters, histograms, moving averages).
    • Enhanced Logging: Supports message filtering (filter=), user tags (error_log_user_tag), JSON output (format=), and rate limiting (rate=).

    Configuration & Operations

    • Combined Locations: Use multiple matching expressions in a single location directive.
    • Rewrite goto: Performs an internal redirect to a named location without modifying the URI.
    • Automatic DNS Resolver: Automatically configures the resolver from /etc/resolv.conf and re-reads it on changes.
    • Custom Time Format: The time_format directive allows custom strftime()-like specifiers including %L for milliseconds.
  2. Get started with Angie

    master

    Angie is an efficient, powerful, and scalable web server designed as a drop-in replacement for nginx. It maintains compatibility with existing module layouts and configurations while providing enhanced features.

    To begin using Angie, refer to the official documentation for your preferred language:

  3. Overview of Angie web server

    master
    Angie is an efficient, powerful, and scalable web server designed as a drop-in replacement for nginx. It is engineered to allow users to migrate existing setups without requiring major changes to module layouts or configuration files.
  4. Manage Angie process signals

    master

    The Angie master process and worker processes respond to specific system signals for lifecycle management.

    Master Process Signals

    • SIGINT, SIGTERM: Shut down the server quickly.
    • SIGHUP: Reload configuration. The master starts new worker processes with the new configuration and gracefully shuts down old workers.
    • SIGQUIT: Shut down the server gracefully.
    • SIGUSR1: Reopen log files.
    • SIGUSR2: Upgrade the Angie executable on the fly.
    • SIGWINCH: Gracefully shut down worker processes.

    Worker Process Signals

    Worker processes support a subset of master signals:

    • SIGTERM: Shut down quickly.
    • SIGQUIT: Shut down gracefully.
    • SIGUSR1: Reopen log files.
  5. Enable debugging logs in Angie

    master

    To debug issues, you must first ensure Angie was built with debugging support using the ./configure --with-debug ... flag.

    Once built, you can enable debugging in two ways:

    1. Global Debugging

    Set the debug level in your error_log directive:

    error_log /path/to/log debug;

    2. Per-IP Debugging

    To limit debug output to a specific IP address, use the debug_connection directive within the events block:

    events {
        debug_connection 127.0.0.1;
    }
    events {
        debug_connection 127.0.0.1;
    }
  6. Convert CSV GeoIP databases using geo2nginx.pl

    master
    Use the geo2nginx.pl Perl script to convert CSV GeoIP databases (such as those from MaxMind) into a format compatible with the ngx_http_geo_module. This allows you to use GeoIP data within your Angie configuration files.