You're right. On servers the subdomain handling works well du to nginx subdomain handling. But it still requires wildcard dns entries. Unfortunately those wildcard dns entries do not work with /etc/hosts file.

I just double-checked this behaviour. It was already discussed here: http://serverfault.com/questions/118378/in-my-etc-hosts-file-on-linux-osx-how-do-i-do-a-wildcard-subdomain