Virtual hosts are such a great tool for web developers to test locally without losing their mind, but web development in 2015 involves testing on far more than a single machine. If your mobile iOS devices are on the same network, here is a simple trick.
- Go to System Preferences on your Mac.
- Go to the Network panel.
- You should see your IP address in here. Mine right now is 10.0.1.6.
- Go to Settings on your iOS device.
- Go to the Wi-Fi section.
- Tap the info icon on your current Wi-Fi network.
- Scroll down to the HTTP Proxy and tap Manual.
- Enter the IP address you found above into the Server field.
- Enter 80 into the Port field.
- Go to your browser of choice on the iOS device and go to your virtual host.
Simple enough for quickly testing your websites.