Spoiler: It doesn't work.
The behavior you'll see is that the Lync client will issue the Autodiscover query, receive a successful response, and then never even attempt to contact the EWS URL. No DNS lookup, no HTTP request, nada. Consequently you'll see "EWS not deployed" in the configuration info or get the red bangs on the conversation history and phone tabs.
The only fix available is to modify your EWS virtual directory URLs to be HTTPS instead of HTTP, which you probably should be doing anyway, but I have run across deployments where this was not the case. After the change to HTTPS the Lync client will begin contacting the EWS URL correctly.