开发者

Make WAMP www available on local network

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 ne开发者_StackOverflow中文版ed 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?


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.


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.


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.


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


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


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.


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜