Your server is calling the system config and only showing you that url.
<VirtualHost *:80>
ServerName x.mydomain.com
Alias /system /var/www/html
DocumentRoot /var/www/html/
<Directory "/var/www/html">
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
You should not try and point a subdomain to two different directories, not really going to work properly.
You should just point the servername to the main html directory this will allow you to use the subdirectories like
http://x.mydomain.com/system/public
http://x.mydomain.com/test/public
Or another suggestion would be to use two different subdomains:
<VirtualHost *:80>
ServerName x.mydomain.com
Alias /test /var/www/html/test/public
DocumentRoot /var/www/html/
<Directory "/var/www/html/test/public">
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName y.mydomain.com
Alias /system /var/www/html/system/public
DocumentRoot /var/www/html/
<Directory "/var/www/html/system/public">
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Personally I would use two separate subdomains to access each.
Hope this helps.