Short definition
sites-available is a directory in Ubuntu’s nginx setup that stores virtual host configuration files. Files here are not active until a corresponding symlink is created in the sites-enabled directory.
Extended definition
Ubuntu’s nginx package introduces a convention for organising virtual host files that separates storage from activation. Configuration files live in /etc/nginx/sites-available/, one file per domain or application. To activate a configuration, a symlink to it is created in /etc/nginx/sites-enabled/. nginx only reads files in sites-enabled, so a site in sites-available without a symlink is completely inactive. This pattern makes it trivial to enable and disable sites without modifying or deleting any configuration file, and keeps an organised record of all configured sites, whether or not they are currently serving traffic.
Deep technical explanation
The symlink pattern: Activating a vhost: ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/ Deactivating a vhost: rm /etc/nginx/sites-enabled/example.com The file in sites-available is untouched in both cases.
Default site: Ubuntu’s nginx ships with a default file in sites-available and a corresponding symlink in sites-enabled. This default site should be removed or replaced before serving any real traffic, as it exposes the nginx welcome page to any request that does not match a named server block.
Naming conventions: The convention is to name each file after its primary domain, for example api.company.com , or staging.company.com. Consistent naming makes fleet-wide automation straightforward: listing sites-available gives an immediate inventory of every configured domain on the server.
Automation considerations: In a managed fleet, sites-available files are the primary target for automated vhost changes. A script or agent that needs to add, modify, or disable a domain only needs to write to sites-available and manage the corresponding symlink in sites-enabled, followed by an nginx -t and nginx reload.
Why it matters
The sites-available pattern is what makes the nginx vhost management scriptable and auditable. Every configured domain has a file, every active domain has a symlink, and the relationship between the two is explicit. In a fleet of hundreds of servers, this predictable structure is what automation relies on.