title: Viewing a local web site on the LAN under a different hostname
body: <p>In short I'm trying to browse a Mac's web site on the local wifi network under a <code>.local</code> hostname that is not the same as the machine's 'computer name' and think I'm missing a setup step.</p>
  
  <p>I have a local install of nginx on my Macbook, with the proper <code>/etc/hosts</code> and <code>nginx.conf</code> entries to serve multiple sites, each with their own distinct local hostname. Assume the Macbook's network name is computername.local, and I have 2 sites running, one at <a href="http://computername.local" rel="nofollow">http://computername.local</a> and another at <a href="http://servicename.local" rel="nofollow">http://servicename.local</a>. I can access each of these sites just fine from the local machine, but also want to be able to access <a href="http://servicename.local" rel="nofollow">http://servicename.local</a> from an iPhone on the same WiFi network. I'm getting a timeout for that URL, but the other one works just fine.</p>
  
  <p>I'm guessing something has to be done to allow servicename.local to be used on the local network, which I've left out. What is required to do that? Do I need to use Bonjour for that? Where would I add this new local hostname?</p>
  
  <p>Another Mac on the same network can access this one under servicename.local just fine if I define the IP in its <code>/etc/hosts</code> file too, but I can't modify that file on the iPhone obviously. It's not jailbroken, and I'm not really interested in doing that just to get this working.</p>