The problem is most likely in your virtual host config. You need to bind the servername so it sees "mydomain" and uses that rather than 127.0.0.1
Here's an example from mine - I've got a few and this format always works:
<VirtualHost *:80>
DocumentRoot "C:/Development/Web/test.wordpress.dev"
ServerName test.wordpress.dev
<Directory "C:/Development/Web/test.wordpress.dev">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
Allow from 127.0.0.1 192.168.0.0/8
Deny from all
Require all granted
</Directory>
</VirtualHost>
I also have the "NameVirtualHost *:80" setting in my httpd.conf (just before the virtual host declarations) - its supposed to be deprecated/obsolete but if your config looks like the one above but its still not working, try adding it.
In case you don't know, the <VirtualHost *:80> is because I'm binding the server to all my IP addresses (my Listen is set to 80), so I can use other devices on my network to check the website renders properly.