LaiRu HTTP server

The built-in HTTP server runs a site directly from the LaiRu binary.

Target guide

The HTTP server is useful for local development, test fixtures, and controlled internal tools. It accepts an address, a document root, and a configuration file. For public production sites, prefer nginx or Apache in front of LaiRu FPM so TLS, static files, and mature HTTP controls stay in the web server.

Parameters

--addr
TCP address and port to listen on, such as 127.0.0.1:9020.
--unix
Unix socket path for socket-based local serving where supported.
--docroot
Document root for request-addressable files.
--config
Ini file containing paths and interpreter options.

Examples

Working pattern

1lairu serve --addr 127.0.0.1:9020 --docroot /var/www/html
Use this as a focused starting point and adapt it in context.

Run a local HTTP server

1lairu serve \2  --addr 127.0.0.1:9020 \3  --docroot /var/www/html \4  --config /etc/lairu/config/lairu.ini
The built-in server is useful for local development, fixtures, and small controlled deployments.

Related