Skip to content

Sites

Sites in Gruxi are defined by their hostnames. Each site can have its own configuration, including bindings, TLS settings, and processors.

Each site can be mapped to one or more bindings, so a single site can be served on multiple ports or IP addresses.

To default or not to default

A site can be configured as a default site, which means it will be served when no other site matches the request.

If you do not want Gruxi to respond to an unknown hostname, make sure not to mark any sites as default. In that case, Gruxi will return HTTP 404 Not Found for unknown hostnames.

How sites are matched

Gruxi uses a simple first-match algorithm to determine which site should handle a request. The first site configuration that matches the request’s hostname and port is used. If nothing matches, the default site is used (if configured).

Next step

A big part of site configuration is defining how content should be served.