I recently upgraded our internal LEMP stack to use Nginx instead of Apache and one of the feature I missed was the VirtualDocumentRoot directive from a module called mod_vhost_alias to dynamically set the DocumentRoot like this: <VirtualHost *:80> DocumentRoot /var/www ServerName example.com UseCanonicalName Off