If you are behind a NAT/firewall, probably your webserver has a local IP address (probably 192.168.xxx.xxx) and your router/firewall is responsible for forwarding incoming requests to your webserver.
In this situation, you have a public IP address for your www.yourdomain.com
but, in fact, Apache has to accept requests in your local interface instead of your public IP address (assigned to your router/firewall in fact).
Try something like this in your /etc/hosts:
# these lines MUST be kept otherwise Apache2 fail serving these addresses
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback