Reachable on a few local machines
If you want mysite.dev to work on just a couple of local machines, you can always edit their /etc/hosts files. Windows also have hosts files that you can edit, which are located in C:\Windows\System32\drivers\etc\hosts.
In the hosts file on the computer you want to set up being able to reach mysite.dev, just add this to the bottom of it (both Windows and Linux):
SERVERIP mysite.dev www.mysite.dev
Where you replace SERVERIP with the local IP address of your server running Apache.
Reachable on the entire local network
If you want it to work on your local network, you'll ned a DNS server and configure the networks DHCP server so your local machines do all their DNS queries through your server.
First, let's install bind.
sudo apt-get install bind9
Then we'll ned to start configuring bind and adding a DNS zone, in this case the mysite.dev. Start by editing your /etc/bind/named.conf.local file and add the following block to it:
zone "mysite.dev" {
type master;
file "/etc/bind/zones/mysite.dev;
}
Then, create the direcotyr /etc/bind/zones.
sudo mkdir /etc/bind/zones
Now, let's add the zone file for the mysite.dev domain. Create and edit the file /etc/bind/zones/mysite.dev and add the following to it:
$ORIGIN . ; -*- zone -*-
$TTL 600 ; 10 minutes
mysite.dev IN SOA YOURSERVERNAME. hostmaster.mysite.dev. (
2012102300 ; serial
6H ; refresh
30M ; retry
4W ; expire
10M ; minimum (10 minutes)
)
NS YOURSERVERNAME.
A YOURSERVERIP
$ORIGIN mysite.dev.
www A YOURSERVERIP
Now take a closer look here. You need to change the two occurances of YOURSERVERNAME and the two occurances of YOURSERVERIP references to the ones that matches your server. For example server01.local and 10.0.0.2. To find out your server name, type hostname -f in a terminal window on your server.
If you're gonna change anything in this zone file (like adding subdomains later or something), you must remember to update the serial number. In this case it's 2012102300. The value must be set to a higher value, e.g. 2012102301.
Restart the bind service with sudo service bind9 restart and the DNS server should be up and running for your domain. You should probably test this by running dig @localhost mysite.dev from the server itself before you jump on to the next step. You can also test it from a client computer on the network with dig @YOURSERVERIP mysite.dev, where YOURSERVERIP is the IP address for your server.
Now, the last thing you need to do, is update your DHCP servers configuration and set your local server as the (secondary, if possible) DNS server. This, unfortunatley, I can't help you with that easily.
Reachable on the internet
Since there is no top level domain name called .dev, it is necessary for ICANN to create this. At this point their gTLD application system is closed, but maybe it will be possible to apply for the .dev TLD some time in the future. Note that they probably want a bunch load of money for it.