I have a very basic knowledge of how a web server works. I wish to learn how to set a third level domains test1.mysite.tld such that it points to a web server subdirectory /var/www/test1/. (www.mysite.tld should keep to point to main directory). I am on a machine with Debian. I defined a virtual host within apache2.conf
<VirtualHost *>
ServerName test1.mysite.tld
DocumentRoot /var/www/test1/
LogLevel debug
ErrorLog other_vhosts_access.log
</VirtualHost>
Still, when I try url test1.mysite.tld, /var/www/index.html is returned, instead of /var/www/test1/index.html.
Do I miss something? A rewrite rule? Do I need to do anything for the DNS? Thanks for your help