How can i access my local wamp server on another computer
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
i use this code in http.config file but not work
How can i access my local wamp server on another computer
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
i use this code in http.config file but not work
You could simply use the Put Online
option of your WAMP Server and you can use this current system IP address and to directly access from the other computer.
Do this on system tray
Then, you could find your IP address using typing ipconfig
or whatismyip.com
website and then access it on another system.
As you are able to access it from the local computer that run the server by http://localhost
you have two options to access it from your local area network LAN:
http://192.168.1.20
http://computer1/
To know your current IP:
Start -> in search field write cmd
and hit enter to open the command line -> in the command line write: ipconfig you will get something like that:
Your computer IP address is the value of IPv4 Address.
To know your computer name just right click on the computer icon in the start menu then choose properties to get this screen shot:
However, for computer name method you have to be sure that every computer in your LAN has a unique name.
There are some routers firmware supports local DNS on the router, so you have not need to edit the hosts files for every machine in the network. For example that I already have, dd-wrt firmware on Linksys WRT54G:
Mine wasn't working before when I tried using my computer's IP in the URL. I found the reason to be the line in httpd.conf:
ServerName localhost:80
which I updated to be
ServerName {My comp's IP}:80
If you just need to access the wamp server from another LAN PC, as some of the answers have pointed out, you can use the LAN IP
or Computer-Name
in the URL, as long as VirtualHost's ServerName
or ServerAlias
directive contains that LAN IP
or Computer-Name
(so Apache can return the correct website).
But if you need to use a domain-name, you'll have to edit every PC's Hosts file
and update it with the correct domain-name to LAN IP address resolve (and make sure that LAN IP is assigned each time to the correct device by the Router).
Though there are much better solutions that will work for all devices (including Mac, Linux, mobile devices such as iPhones, Android phones, etc) if you have a WiFi Router that can either be flashed with one of the open firmwares or is already capable of DNS Masquerading
as outlined here: Accessing Websites on a Local Network (LAN) Web Server. "DNS Masquerading" (in this context) is basically using the WiFi Router's own "Hosts file" to do the domain-name to LAN IP resolve.
Step 1 : Press window button + r at same time which open run tool of window.
Step 2 : Write CMD, then press 'enter button'. Open CMD terminal.
Step 3 : Then write 'ipconfig' command
Step 4 : Then note your ipv4 Address : 192.168.x.x (From Wireless Lan Adapter Wi-Fi Hedaer) (This Ip address is needed by other computer in the place of localhost in URL)
Step 5 : Go to phpmyadmin.conf file of hosting system(Where wamp is installed...File path -> C:\wamp\alias\phpmyadmin.conf)
Step 6 : Replace this statement
<ifDefine APACHE24>
Require local
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</ifDefine>
with
Require local
Require ip 192.168.0
Note : (If your Ip is something like 192.147.x.x) then you write 'Require 192.147.0' instead of 'require 192.168.0')
Step 7 : Restart your Wamp server
Step 8 : Enter the 192.x.x.x/phpmyadmin in the url bar of your own system from which you want to access the hosting wamp server
Step 9 : End.
Hope this helps
I couldn't connect event after doing all the above-mentioned steps. Then I uninstalled my current wampserver (3.0 version) and installed 2.5 version of wampserver. And it worked perfectly. You just need to click on 'Put Online' and you are done. Others can access your server by putting your ip address in the URL instead of localhost.