How does work with Apache server running virtual hosts?

Could section work with a single Apache server running virtual hosts for a number of domains?

Sure! works with any HTTP web server, even those configured for name based virtual hosting. No special configuration is necessary.

This works because preserves the requesting browser’s HTTP headers, including the Host header.

That means that your end user will browse your site as per usual. will forward the user’s Host header to your Apache server, and the Host header will be used by Apache to work out which virtual server should service the request.

This also works with HTTPS based virtual hosting, because will use Server Name Indication (SNI) when HTTPS connections are established, so Apache will still work out the right virtual server.