In Order to use multiple domains on the same server path one solution is, to modify the apache mod_rewrite module and the .htaccess.
Add the following code to your .htaccess:
RewriteCond %{HTTP_HOST} domainA.com RewriteRule ^robots.txt$ /robots-domainA.txt [L] RewriteCond %{HTTP_HOST} domainB.com RewriteRule ^robots.txt$ /robots-domainB.txt [L]