Make WAMP www available on local network

[亡魂溺海] 提交于 2019-12-18 04:48:05

问题


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?


回答1:


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.




回答2:


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.




回答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.




回答4:


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




回答5:


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




回答6:


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.




回答7:


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.




回答8:


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.




回答9:


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



来源:https://stackoverflow.com/questions/5657279/make-wamp-www-available-on-local-network

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!