How to Access WAMP 3.2.0 in Your Local Area Network

Why Would You Need WAMP on Your Local Network?

When developing locally you will want to test your website from multiple devices connected to your network. By giving access to WAMP over LAN it allows you to connect to your website from any device such as a Laptop, Smart Phone, or Tablet. This is easy to set up and only requires a small edit to your httpd-vhost.conf file.

Leave the server OFFLINE as this functionality is defunct and no longer works, which is why the Online/Offline menu has become optional and turned off by default.

Step 1: Edit Your httpd-vhost.conf File

You will need to change a couple of lines in your httpd-vhost.conf.

Navigate to c:/wamp64/bin/apache/apache2.4.41/conf/extra/httpd-vhost.conf and open with a text editor like Notepad.

Below, is a default virtual host file. It should look like this if you have not added any of your own Virtual Hosts.

#
# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

If you want to allow access from anywhere replace Require local with:

Require all granted

If you want to be more specific and secure add access rights like this to only allow computers in your local network:

Require local
Require ip 192.168.1

Or to be even more specific and only allow certain computers:

Require local
Require ip 192.168.1.101
Require ip 192.168.1.102

Make sure to restart WAMP after you edit the httpd-vhost.conf.

WAMP Server Training: Learn WAMP Server online. Courses as low as $9.99 at Udemy!

Step 2: Setup the Other Computers

You will need to edit the host file c:/windows/system32/drivers/etc/ of the computer that will be connecting to your WAMP website. Use a text editor like Notepad and make sure you run it as an Administrator.

Find the internal ip of the computer that is running WAMP at what is my local IP? and update as shown below. Replace “192.168.1.101” with the internal IP of the machine running WAMP.

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This file contains the mappings of IP addresses to hostnames. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
#
# localhost name resolution is handle within DNS itself.
#
#       127.0.0.1       localhost
#       ::1             localhost

192.168.1.101   yourwebsite.com         # IP Address | ServerName

You should now be able to access your WAMP website through your local network. If you run into any problems, please let me know in the comments below.

WAMP Server Training: Learn WAMP Server online. Courses as low as $9.99 at Udemy!

If you enjoyed this tutorial, please be sure to follow us on Facebook and Twitter. You can also find us on Freelancer if you need some help with your WordPress website or web development issues.

More Great Tutorials

Amy Green

My name is Amy and I am the co-author here at Zuziko. I am a freelance writer, front-end web developer and entrepreneur. When I am not writing about WordPress, I am busy being a full-time mom.

7 thoughts on “How to Access WAMP 3.2.0 in Your Local Area Network”

  1. IT Manager

    This is how I solved the problem, and it is obvious if you think about it. In Wampserver 3.2 there is a wizard to create your virtual host. However, it only used the name of the virtual host folder as the name of the virtual host server. When you access the server remotely you use the fully qualified domain name, but there is no configuration for that yet in Wampserver httpd-Vhost.conf file. Get to this file from the Wampserver->Apache menu. Copy the current vhost you want to access and paste that config into the file. Change the servername to the fully qualified domain name of the vhost. This also assumes you have a DNS CNAME entry for your vhost.

  2. thanks it works 🙂

  3. Xavier

    Thanks to you.
    I now can access my web server based on Wamp from my PC on local network and on the internet !

  4. David

    This is my file, it does not work

    # Virtual Hosts
    #

    ServerName localhost
    ServerAlias localhost
    DocumentRoot “${INSTALL_DIR}/www”

    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require all granted

  5. Paul

    This does not work. Instructions are simple enough and I followed them exactly but still cannot access my site from any other local devices.

  6. I tried to turn off WAMP and start IIS For Microsoft Server (I works perfectly From any PC) but WAMP is still not not working

  7. Simon

    Hey Amy,

    Thank you for this article but I am having issues.

    My main concern comes from replacing “yourwebsite.com” with your server name.

    Should it be 192.x.x.x/sitename?

    My site is like that but when I put it on the other computer in my office it doesn’t work and tells me that the server IP address cannot be found.

    Any idea?

    Thank you.

Leave a Comment

Share via
Copy link
Powered by Social Snap