xip.io and Apache ServerAlias
Today I switched around a bunch of my local sites to work with xip.io, which if you haven’t heard, is the new hotness. And, if you’re using Apache or MAMP Pro it’s super simple. Just setup your VirtualHost as follows:
<VirtualHost *>
ServerName client.dev
ServerAlias client.*.xip.io
DocumentRoot /Users/you/Sites/client
</VirtualHost>
In MAMP Pro it’s a little more involved. Select the host you want to work with xip.io in the left column. Then, choose the Advanced tab and enter the following in the “Customized virtual host general settings:”
ServerAlias client.*.xip.io
That’s it. Hit Apply and Reload and you should be able to browse to client.127.0.0.1.xip.io to see your site from anywhere on the network.
