Is there a best practice (for performance reasons or otherwise) for choosing between using a Virtual Host or rewrite for pointing a subdomain to a folder in the root directory?
I.e.,
www.domain.com -> public_html/domain.com/
sub.domain.com -> public_html/sub.domain.com/
The above can be accomplished by setting up two virtual hosts or by using a single virtual host and just having a rewrite set up to point to the correct sub directory.
My question originally concerned Apache, but I would be interested in knowing if there's a best practice for Nginx's Server Block as well.