9

I know there are questions similar to this, but none address my specific situation.

I have a WAMP server setup for developing some websites, and it's running great. I need it to be available to another computer on my local network via a wireless router. The other computer is actually a Mac, and I only need to be able to view the development sites through a browser (do not need to access phpmyadmin or mySQL).

I am able to access the localhost on which WAMP is running through the browser (the default WAMP page is displayed with links to the site projects) using the IP of my windows machine. Obviously clicking on the links would result in page not found since the URL is relative to localhost, but even if I explicitly type in the url with the IP (http://192.168.2.1/myproject) i still get nothing. (and the url redirects to localhost/myproject even if I type it in as shown)

My host machine has a dynamic IP, but since it is hard-wired to the modem and router the IP does not change unless I reset the router/modem. I can't see this being the problem though since I am able to access the default WAMP page using the IP from the Mac.

Any ideas?

biggles
  • 3,021
  • 5
  • 27
  • 36
  • I could be wrong but isn't that what the [Put Online](http://imgur.com/xGago) menu option is for? – drudge Apr 14 '11 at 00:41
  • it is online but I am still unable to connect – biggles Apr 14 '11 at 01:00
  • It may be a firewall/router issue then. – drudge Apr 14 '11 at 02:30
  • I did configure Windows Firewall on my host machine to allow Apache access (which I was then able to view the default page though a browser on the Mac) but still unable to access the project folders. Could it be an issue with security on the Mac machine? – biggles Apr 14 '11 at 02:40
  • 1
    If you can access the default page, but not the project folders, then yes it sounds like a permissions issue. – drudge Apr 14 '11 at 03:24

9 Answers9

11

By default httpd.conf have the following settings.

 Deny from all

you have to make the below mentioned changes.

 Allow from all

and make WAMP as a online.

You can access you site by IP address or Computer name from Network.

Thirumalai murugan
  • 5,698
  • 8
  • 32
  • 54
user2691749
  • 111
  • 1
  • 2
  • 1
    I have followed your instruction and it worked but my when I loaded the project, it doesn't looked like the way it should really look. I think the css are not loaded – Eli Nov 07 '14 at 07:31
8

I had the same problem with my Wordpress site. My aim was to see the developmental website from a browser in another PC/Linux Workstation on the LAN. Following steps resolved the issue for me:

  1. Go to WordPress Settings > General > WordPress Address (URL) and Site Address (URL)

  2. Add local IP address of the localhost PC where WAMP server is running to the fields and save the settings. (e.g. http:// 192.168.0.101/wordpress; Use ipconfig in a DOS command window to get IP address of the localhost).

  3. From the WAMP server menu on system tray "Put Online". Now any other devices in the LAN can view the website using the IP address on a browser (http:// 192.168.0.106/wordpress) and the links should be working now.

Insilico
  • 866
  • 9
  • 10
3

Try these recommendations. My suggestion would be to check if Apache is bind only to 127.0.0.1 (localhost) and add 192.168.2.1 mapping if it is not there. Don't forget to restart Apache after adding it.

Community
  • 1
  • 1
Daniel Protopopov
  • 6,778
  • 3
  • 23
  • 39
  • I have tried adding a line to the httpd.conf (I asssume this is where these setting are added) and WAMP turns orange when I restart apache. I am obviously doing something wrong. I am not very familiar with Apache, could you explain in more excruciating detail? :) (I did look at your links, btw.) – biggles Apr 14 '11 at 01:19
  • Try connecting to web server' port using telnet from another machine on the network. If you can connect, then it's Apache. If you can't, then it's firewall/router issue, although there can be variations. Also, while accessing server through browser on another machine, record the GET request (through Firefox plug-in) and check what it returns. – Daniel Protopopov Apr 14 '11 at 13:46
2

If you are using wamp on windows than please change your windows firewall settings to OFF mode and restart your server and check.

Control Panel-->System and Security-->Windows Firewall-->Turn off windows Firewall

Just make the above change and see this will work.

cheers Amit

Amit
  • 29
  • 1
  • 2
    Recommending that people turn off their firewall is really stupid advice. Instead, simply allow port 80 on the IP you want to use. – AStopher Jan 31 '17 at 13:43
1

First of all put online your wamp on your dashboard. Later on if there is a setting in httpd.conf file Listen 80 if this is different than that.

Change it to Listen 80 then disable your firewall restart Wamp all services.

Mihai Iorga
  • 39,330
  • 16
  • 106
  • 107
Emre Karataşoğlu
  • 1,649
  • 1
  • 16
  • 25
1

First of all put online your wamp on your dashboard. And then put off your firewall Later on if there is a setting in httpd.conf file Listen 127.0.0.80 if this is different than that.

Change it to Listen 127.0.0.80 to Allow for all restart Wamp all services.

Sunil Kumar
  • 7,086
  • 4
  • 32
  • 50
1

Makes sense now that I have figured it out.

The redirect to localhost was actually caused by the configuration file for the CMS that the site was built on (thus why it would bring up the main WAMP page, but not be able to load the project site).

biggles
  • 3,021
  • 5
  • 27
  • 36
0

You could try adding the hostname of the server to the hosts file on the Mac. Then you're hitting the HTTP server using a valid hostname.

Andrew Cooper
  • 32,176
  • 5
  • 81
  • 116
0

I think you are using wrong ip address as most of router uses 192.168.1.1 for itself. Thats why you are not able to view anything i.e your computer has different ip address.

To solve it, first you need to know ip address of your ow computer I window go to cmd and type ipconfig there you can see your computer lan ip address in IPv4

Use this ipaddress to connect to wamp server.

Hope this help you