Viewing a site on your local LAN using Acquia DevDesktop 2

Submitted by Brian on April 4, 2016 - 10:57am
View your local site on other devices.

Often times, when developing you want to view your site on various other devices. There are a number of solutions out there using web based proxies to tunnel your site (ngrok, localtunnel, etc) however I have found these to be too slow and often times have issues with redirects, etc.

here's a quick and dirty guide to viewing a DevDesktop site with minimal changes (on a mac)

  1. First, get your IP address of the machine that is hosting the site. ifconfig or go to System Preferences -> Network (e.g 192.168.1.1)
  2. add port to end of URL (by defaut, dev desktop is :8083).
  3. POTENTIALLY OPTIONAL: depending your firewall you may need to open the 8083 port. (I did). first run sudo pfctl -vnf /etc/pf.conf , then edit /etc/pf.conf . Add the port you want to open:
    # Open port 8083 for TCP on all interfaces
    pass in proto tcp from any to any port 8083
  4. run sudo pfctl -vnf /etc/pf.conf (which tells it to start the rule)
  5. Now you need to edit your vhosts in dev desktop. /Applications/DevDesktop/apache/conf/vhosts.conf . make sure the site you want is the first in the list of sites so you dont need to deal with any aliasing, as default the first item will resolve
  6. find change ‘require local’ for your site, and change it to 'require all granted'
  7. restart apache (sudo /Applications/DevDesktop/apache/bin/apachectl restart)

Thats it, now go to the URL (e.g.192.168.1.44:8083) on your device and you should see the site.

EDIT: Weird DNS issue I found. If you are on a network that has multiple wireless hotspots, make sure you are connected to the same physical router node point.