Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Web Servers & Proxies

This category covers web servers and reverse proxies/load balancers.

Web Servers

Apache HTTP Server

Apache HTTP Server is a widely-used web server software.

Installation

environment.systemPackages = [ pkgs.apacheHttpd ];

Verified Usage

# Start server with a configuration file
httpd -f /tmp/httpd.conf

Caddy

Caddy is a modern web server with automatic HTTPS.

Installation

environment.systemPackages = [ pkgs.caddy ];

Verified Usage

# Start a file server
caddy file-server --listen 10.0.2.15:8002

NGINX

NGINX is a high-performance web server, reverse proxy, and load balancer.

Installation

environment.systemPackages = [ pkgs.nginx ];

Verified Usage

# Start server with a configuration file
nginx -c /tmp/nginx.conf

OpenResty

OpenResty is an Nginx-based web platform with LuaJIT support.

Installation

environment.systemPackages = [ pkgs.openresty ];

Verified Usage

# Start OpenResty with a custom prefix and config
openresty -p /tmp/openresty -c /tmp/openresty.conf