Host selection
src/sites.rs checks /etc/pixie/sites/<hostname> for each request. It lowercases the host and removes the port. If there is no matching folder, it checks /etc/pixie/sites/default. PIXIE_WEB_ROOT overrides this lookup for a single site.
Path mapping
src/router.rs normalizes the URL path and confines reads to the selected site. A directory serves index.html; hello.html remains the home page fallback. Missing files use 404.html when available and return 404.
Static responses include a MIME type based on the file extension. HTML, CSS, JavaScript, images, fonts, and other binary files are returned as bytes. Files are read on request, so updates appear without restarting Pixie.
Path safety
Hidden paths, traversal segments, encoded separators, and symlinks that escape the site directory are rejected. This keeps requests inside the selected root even when a client supplies unusual paths.
Single-page apps
Set PIXIE_SPA_FALLBACK=true to serve root index.html for missing extensionless paths. Pixie leaves missing file-like paths such as /logo.png as 404 responses.