How to Access WAMP 3.2.0 in Your Local Area Network

We have stopped using WAMP altogether and are no longer writing about it or answering inquiries. We are leaving theses posts up for the time being as many have emailed us about them being helpful.

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.

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.

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

  1. fritz

    Would it be possible to only allow users in local server to access wamp server and only allow others to access projects/subdirectories in wamp server?
    example server name: Tiger
    project is located in: Tiger/timelog/
    So Tiger (WampServer) can only be accessed if user is logged in the server
    Tiger/timelog (project) can be accessed by all users in network

  2. a_aramini

    Thanks for leaving this post up!

    “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.”

    The Online/Offline toggle menu item has been removed in later versions of WAMP.
    To effectively put WAMPServer “offline” you would just click “Stop All Services” in the menu (left-click).

    You could, but really wouldn’t want to open your local server to the outside world which would require opening a port on your firewall/router and setting up port forwarding to your local host which is a huge security issue if you do not understand what you are doing, and there are major security implications if you configure your security settings improperly.

    I am running WAMP v3.2.8 – 64 bit, which is the latest version at the time of this writing (April, 7, 2022). I got it working fine on the local network by following this post and a sticky post at the WAMPServer forum (http://forum.wampserver.com/read.php?2,127757). My local site is accessible from other PCs on my local network via a link similar to:

    http://myprojectname/

    (I am not using https yet, as I haven’t yet generated a self-sign certificate or configured SSL yet but plan to do that next).

    The whole point of virtual hosts is to be able to configure more than one “site” or web app project on a single server (similar to how virtual or shared hosting is done on a web host).

    The only thing is, since you cannot access the host file on a mobile device like iPhone or Android without jail-breaking/rooting the device, you cannot access your local site on mobile… unless… you configure a proxy on the host which makes the connection for the mobile device and handles the redirect to localhost.

    I think a lot of people who are new and don’t understand networking or relative paths vs FQDN URLs and DNS get confused about a few things and therefore can’t get WAMPServer to “work” correctly. I assure you it is possible. If it isn’t working for you, your config is wrong or the relative paths in your HTML, PHP, etc pages are incorrect.

    A caveat I ran into is that if you are using relative paths in your web pages, and you have a directory like “C:\wamp\www\myproject\” and the virtual host is using “myproject” as the server name for the virtual host, you will want to omit the “myproject” portion from the relative paths in your pages and just use “/” for the root of the server in your pages where you have relative paths. Otherwise you will get “Page Not Found” errors, because the links will become:

    “http://myproject/myproject/myfile.html”

    when it should be:

    “http://myproject/myfile.html”

    Normally, “/” represents “www” folder on the server, but with virtual hosts using that are using the name of the project folder as the server name, “/” represents “www/projectfolder”

    so for a subfolder like “images” where you might store your jpg,and png files, etc, you should use href = “/images/imagename.jpg” instead of href = “/myproject/images/imagename.jpg” in the paths in your web pages.

  3. Johan Eklund

    Hi
    Thank you for the excellent description.
    I am running version 3.2.3.3, 64 bit on Windows 10 Pro.
    I have done STEP_1 and STEP2.
    When I try to connect the computer/client (Win10) with GoogleChrome with the address that I have given which are “arduinowebsdfoldervirtualhost.local”… nothing happens…
    Can you give me a hint here what I am doing wrong?

    BEST REGARDS
    Johan

  4. Ger

    In your intro you talk about connecting to WAMP with Smartphone or tablet.
    However those devices don’t have host files, so you’ll need to configure the routers DNS to the machines IP.
    Also don’t use top level domains (e.g .com) because they can make the outside domain not reachable.

  5. 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.

  6. thanks it works 🙂

  7. Xavier

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

  8. 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

  9. 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.

  10. 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

  11. 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