Restrict registration to specific vhost?

I'd like to configure ejabberd so that registration is only possible on the specified vhost.

How to enable registration only on xmpp.example.com.

The following is not working with my ejabberd 14.07, please advice

host_config:
  "example.com":
    access:
      register:
        all: deny

host_config:
  "xmpp.example.com":
    access:
      register:
        all: allow

Syndicate content