Web developmentJuly 05, 2017

Accessing WAMP From other Computers on Your LAN?

When you will developing locally, you will want access to your site(s) from multiple computers/devices connected to the same network.  It makes browser testing simple and easy. Setting up WAMP for local area network access involves just a few configuration tweaks around IP Addresses and Apache. So, let’s start.

1) Configure Apache.
    in C:\wamp\bin\Apache#.#.#\conf\extra\httpd-vhosts.conf file you will need to make chnages  

        Deny from all #comment this line
        Allow from
        Allow from #iPhone
        Allow from #iPad
        Allow from #Apple TV
        # Allow Web Fonts to load over BrowserSync proxy
           SetEnvIfNoCase Origin "https?://(www\.)?(johndugan\.local|\d+)?$" AccessControlAllowOrigin=$0
           Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin

2) Update The Hosts File on LAN Computers

The hosts file is the first reference in the DNS lookup process. Before your computer goes out the the Web to fetch DNS information, it will look at the hosts file. That is why you must add entries in the hosts file on each computer that you want to point to your local WAMP site(s).

To add entries to your hosts file follow the instructions below.

Open the hosts configuration file located at C:\Windows\System32\drivers\etc\hosts in notepad.
On a new line, add the IP address of the host machine (the machine running WAMP), followed by the ServerName for the vhost (ie: johndugan.local).
Save and close the hosts file… and you’re all set!

Do you have any question?

feel free to write us here!