I think i kind of underdstand what you mean now correct me if i am wrong. what you want to do is on your dns server as the host file would only apply to the server on which you are making the modification
I suggest you read a bit about DNS to fully understand
In DNS we are going to force the dns server to handle all request thats goes to domain1.com locally instaead of going to the internet
# Start the DNS snap-in. To do this, click Start, point to Administrative Tools, and then click DNS.
# Click the DNS Server object for your server in the left pane of the console, and then expand the server object to expand the tree.
# Right-click Forward Lookup Zones, and then click New Zone. The New Zone Wizard starts. Click Next to continue.
# Click Primary zone to create a master copy of the new zone. Click Next.
# In the Name box, type the name of the zone domain1.com and then click Next.
6. On the Zone File page, accept the default file name for the new zone file, and then click Next.
7. Click Next.
8. Click Finish.
The new zone is listed under Forward Lookup Zones in the DNS tree.
Now once the zone is create you would have to create a host record
o create a host or "A" record:
1. Start the DNS snap-in.
2. Click the DNS Server object for your server in the left pane of the console, and then expand the server object to expand the tree.
3. Expand Forward Lookup Zones.
4. Under Forward Lookup Zones, right-click the zone that you want domain1.com, and then click New Host (A).
5. In the Name (uses parent domain name if blank) box, type the name of the host that you want to add. For example, if you want to add a host record for a Web server, type www in your case its myserver
6. In the IP address box, type the IP address of the host that you want to add. For example, type 192.168.0.100.
7. Select the Create associated pointer (PTR) record check box, and then click Add Host. You receive a message similar to the following:
The host record
www.example.com was successfully created.
Click OK.
8. When you are finished adding hosts, click Done
Becareful with this as your server will try to handle anything under domain1.com so make sure if you have any other servers that reference domain1.com you create A records for them
Like I said I am struggling to understand your exact requirements but give this a go and let me know if you need further help